Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydantic alloy #5560

Draft
wants to merge 119 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
24325fe
Initial setup
bterlson Jul 23, 2024
a9d3e0a
Port mutator
joheredi Jul 23, 2024
8aae4b5
Add basic support for function-declaration
joheredi Jul 23, 2024
a35098d
Test emitter works
bterlson Jul 23, 2024
c16789e
fix package lock
joheredi Jul 23, 2024
1143cbc
Support Union
joheredi Jul 24, 2024
6e5f7bb
Beef up sample
bterlson Jul 23, 2024
0ad093c
Sample improvements, bug fixes
bterlson Jul 24, 2024
ac54d1d
Support model interface
joheredi Jul 24, 2024
1a1b386
fix jsx imports
joheredi Jul 24, 2024
dafc751
Fix conflict
joheredi Jul 24, 2024
2de2aa8
Adopt interface
bterlson Jul 24, 2024
ef8640a
Begin port of CLI emitter sample
bterlson Jul 30, 2024
670f228
Fix some bugs
bterlson Jul 30, 2024
b3d8e76
Fix some bugs
bterlson Jul 30, 2024
3602092
finish porting CLI emitter
bterlson Aug 2, 2024
dd854e3
cli emitter now works
bterlson Aug 7, 2024
a2c2650
It works
bterlson Aug 14, 2024
d8d3241
Scaffold http-client-javascript
joheredi Aug 19, 2024
573774a
Try to rename
joheredi Aug 19, 2024
dab0008
Support literate tests
joheredi Aug 19, 2024
cdac11b
Update test
joheredi Aug 19, 2024
9f220ad
Implement typekits
bterlson Aug 20, 2024
c8113dc
Support emitting array and record
joheredi Aug 20, 2024
1313d5a
Support inline models
joheredi Aug 20, 2024
28dbb1f
update test
joheredi Aug 20, 2024
d0971fb
Update alloy dep
joheredi Aug 20, 2024
5c82f34
Filter out STD and anonymous types.
joheredi Aug 20, 2024
c7d4569
Fix enum component
joheredi Aug 20, 2024
fbe2f11
update sample
joheredi Aug 20, 2024
1a4c319
hosed by circular refs
bterlson Aug 21, 2024
267ffa9
stabs in the dark
bterlson Aug 21, 2024
405192f
fix circular refs
bterlson Aug 22, 2024
8fad521
implement enums
bterlson Aug 22, 2024
c2d6519
use const
bterlson Aug 22, 2024
9eb9288
Merge branch 'main' into alloy
bterlson Aug 22, 2024
0580548
Enable enum in TypeDeclaration
joheredi Aug 22, 2024
a09301d
Support basic and model serializers
joheredi Aug 22, 2024
4fb3a50
Fix some format
joheredi Aug 22, 2024
1735401
Add basic model deserializer
joheredi Aug 23, 2024
7479795
Support utcDateTime
joheredi Aug 23, 2024
cf3495a
update imports and deps
joheredi Aug 23, 2024
9c199f4
support date encoding
joheredi Aug 23, 2024
bd9037e
Implement a few new typekits
bterlson Aug 23, 2024
b536b3e
Implement http typekits
bterlson Aug 23, 2024
3745030
Implement more typekit methods
bterlson Aug 24, 2024
1e886b3
Support utcDateTimeScalars
joheredi Aug 23, 2024
bce5879
fix missing import
joheredi Aug 24, 2024
e1bd386
remove only
joheredi Aug 24, 2024
1704166
Support Record and Array Serializers
joheredi Aug 26, 2024
80abd43
Organize output in folders
joheredi Aug 27, 2024
42b6c11
support basic client context
joheredi Aug 27, 2024
62ed94a
Collect types from interfaces
joheredi Aug 27, 2024
54f8dad
support appending or perpending additional parameters to operation.pa…
joheredi Aug 27, 2024
3238039
Generate http operations
joheredi Aug 28, 2024
b362495
add simple test for httpOperation typekit
joheredi Sep 3, 2024
1fa79c1
Low cost getPlausibleName
joheredi Sep 3, 2024
c2aef71
export model typekit and enhance EF test host
joheredi Sep 3, 2024
d99a487
Add type transform to convert models from client to wire and back
joheredi Sep 3, 2024
22f11e1
Cleanup serializer deserializers
joheredi Sep 4, 2024
0280f18
Add HttpRequest and HttpRequestOptions components
joheredi Sep 5, 2024
13fcd6e
Add httpResponse typekit
joheredi Sep 9, 2024
23853dc
update exports
joheredi Sep 9, 2024
aea55dc
Add getEffectiveModel and getResponses typekits
joheredi Sep 10, 2024
04a331e
Typescript Http Request and Response
joheredi Sep 10, 2024
3233a1e
Update http request components
joheredi Sep 11, 2024
3817643
Add union isExpresion
joheredi Sep 11, 2024
61fe412
Update graph traversal
joheredi Sep 11, 2024
7642e94
Update dependency and fix directories
joheredi Sep 12, 2024
93d4d2a
Move plausible name to type and handle template instances
joheredi Sep 12, 2024
8798f2b
Improve name resolution handling in ef/typescript
joheredi Sep 12, 2024
f628b97
cleanup ts emitter components
joheredi Sep 12, 2024
bfa69a9
Add end to end scenario test
joheredi Sep 12, 2024
b379237
Add Scenario Test Harness
joheredi Sep 13, 2024
d8d535d
Support tags for other languages
joheredi Sep 13, 2024
7be5c3c
Merge pull request #6 from joheredi/alloy-test-harness
joheredi Sep 13, 2024
49bbe3b
Implement getParameters typekit
joheredi Sep 14, 2024
98a9639
Update body handling logic
joheredi Sep 16, 2024
daa06c1
Initial support for discriminated unions
joheredi Sep 16, 2024
da117c4
Generate operations per namespace
joheredi Sep 17, 2024
c94396e
update deps and export barrell
joheredi Sep 17, 2024
c9746d4
Fixes to fetch wrapper
joheredi Sep 17, 2024
e490358
Only one barrell file
joheredi Sep 17, 2024
721da83
Account for bodyRoot
joheredi Sep 17, 2024
d24bd09
Enable alloy prettier pluggin and format js emitter
joheredi Sep 17, 2024
d6f05fc
format
joheredi Sep 17, 2024
5946512
Fix exports
joheredi Sep 18, 2024
18718aa
Handle error and bodyless responses
joheredi Sep 18, 2024
71c8c75
Support options bag and optionality checks
joheredi Sep 18, 2024
8359cde
Refactor ClientContext
joheredi Sep 19, 2024
9c350d9
Formatting
joheredi Sep 19, 2024
ef8741c
Merge remote-tracking branch 'upstream/main' into alloy
joheredi Sep 19, 2024
e37c6d1
Fix breaking changes from TS update
joheredi Sep 19, 2024
0ab6c50
Pull alloy from npmjs
joheredi Sep 20, 2024
a350bf4
Merge remote-tracking branch 'upstream/main' into alloy
joheredi Sep 20, 2024
b3e5fa7
Add Classical Clients
joheredi Sep 23, 2024
01685af
Fix tests and generate clientlet for interfaces
joheredi Sep 23, 2024
f4b0f69
Update alloy deps
joheredi Sep 23, 2024
49ebcb0
Merge remote-tracking branch 'upstream/main' into alloy
joheredi Sep 23, 2024
62e3575
Merge main and move typekits to experimental
joheredi Sep 24, 2024
7e25e03
add todo and petstore output
joheredi Sep 24, 2024
05f18e7
Format after build
joheredi Sep 24, 2024
a8c20b4
Python components
tjprescott Aug 27, 2024
3448da1
Work on class declaration.
tjprescott Sep 26, 2024
b1424c0
Progress.
tjprescott Sep 27, 2024
b1b56d4
Get classes working (again)
tjprescott Sep 27, 2024
242c0c3
Start refactoring enums to use ClassDeclaration.
tjprescott Sep 27, 2024
41a3cea
Fix enum implementation.
tjprescott Oct 3, 2024
6e2eec9
Add docstring test.
tjprescott Oct 3, 2024
1c80c4d
Support an intersected model class type.
tjprescott Oct 8, 2024
2409dce
Render optionals and improve docstrings.
tjprescott Oct 8, 2024
635c586
More docstring support.
tjprescott Oct 8, 2024
21735c4
Work on emitter itself.
tjprescott Oct 9, 2024
85800f3
Refactor.
tjprescott Oct 14, 2024
9fd56a1
Refactoring.
tjprescott Oct 14, 2024
e9358b6
Troubleshooting.
tjprescott Oct 15, 2024
9371be0
Bump alloy version to 0.3.0
tjprescott Oct 15, 2024
5a97573
Troubleshooting complete.
tjprescott Oct 16, 2024
5b4b342
Necessary fixes to emit.
tjprescott Oct 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format
joheredi committed Sep 17, 2024
commit d6f05fc255987914d25378f15275253a30c0138b
8 changes: 1 addition & 7 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -20,16 +20,10 @@
}
},
{
"files": "*.tsx",
"files": ["packages/http-client-javascript/**/*.tsx"],
"options": {
"parser": "alloy-ts"
}
},
{
"files": "*.jsx",
"options": {
"parser": "alloy-js"
}
}
]
}
4 changes: 2 additions & 2 deletions packages/efnext-cli-sketch/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
sourceMaps: true,
presets: ["@babel/preset-typescript", "babel-preset-alloy"]
};
presets: ["@babel/preset-typescript", "babel-preset-alloy"],
};
4 changes: 2 additions & 2 deletions packages/efnext-cli-sketch/tsconfig.json
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@
"declarationMap": true,
"jsx": "preserve",
"emitDeclarationOnly": true,
"outDir": "dist",
"outDir": "dist"
},
"include": [ "src/**/*.ts", "src/**/*.tsx", "test/**/*.ts", "test/**/*.tsx", "tsp-output/**/*.ts"],
"include": ["src/**/*.ts", "src/**/*.tsx", "test/**/*.ts", "test/**/*.tsx", "tsp-output/**/*.ts"],
"exclude": ["node_modules", "dist"]
}
6 changes: 3 additions & 3 deletions packages/efnext-cli-sketch/vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { defineConfig } from "vitest/config";
import { babel } from "@rollup/plugin-babel";
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
include: ["test/**/*.test.ts", "test/**/*.test.tsx"],
exclude: ["test/**/*.d.ts"]
exclude: ["test/**/*.d.ts"],
},
esbuild: {
jsx: "preserve",
sourcemap: "both"
sourcemap: "both",
},
plugins: [
babel({
4 changes: 2 additions & 2 deletions packages/emitter-framework/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
sourceMaps: true,
presets: ["@babel/preset-typescript", "babel-preset-alloy"]
};
presets: ["@babel/preset-typescript", "babel-preset-alloy"],
};
2 changes: 1 addition & 1 deletion packages/emitter-framework/tsconfig.json
Original file line number Diff line number Diff line change
@@ -16,6 +16,6 @@
"outDir": "dist",
"rootDir": "./"
},
"include": [ "src/**/*.ts", "src/**/*.tsx", "test/**/*.ts", "test/**/*.tsx"],
"include": ["src/**/*.ts", "src/**/*.tsx", "test/**/*.ts", "test/**/*.tsx"],
"exclude": ["node_modules", "dist"]
}
6 changes: 3 additions & 3 deletions packages/emitter-framework/vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { defineConfig } from "vitest/config";
import { babel } from "@rollup/plugin-babel";
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
include: ["test/**/*.test.ts", "test/**/*.test.tsx"],
exclude: ["test/**/*.d.ts"]
exclude: ["test/**/*.d.ts"],
},
esbuild: {
jsx: "preserve",
sourcemap: "both"
sourcemap: "both",
},
plugins: [
babel({
4 changes: 2 additions & 2 deletions packages/emitter-sample/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
sourceMaps: true,
presets: ["@babel/preset-typescript", "babel-preset-alloy"]
};
presets: ["@babel/preset-typescript", "babel-preset-alloy"],
};
6 changes: 3 additions & 3 deletions packages/emitter-sample/tsconfig.json
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@
"jsx": "preserve",

"emitDeclarationOnly": true,
"outDir": "dist",
"outDir": "dist"
},
"include": [ "src/**/*.ts", "src/**/*.tsx", "test/**/*.ts", "test/**/*.tsx"],
"include": ["src/**/*.ts", "src/**/*.tsx", "test/**/*.ts", "test/**/*.tsx"],
"exclude": ["node_modules", "dist"]
}
}
6 changes: 3 additions & 3 deletions packages/emitter-sample/vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { defineConfig } from "vitest/config";
import { babel } from "@rollup/plugin-babel";
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
include: ["test/**/*.test.ts", "test/**/*.test.tsx"],
exclude: ["test/**/*.d.ts"]
exclude: ["test/**/*.d.ts"],
},
esbuild: {
jsx: "preserve",
sourcemap: "both"
sourcemap: "both",
},
plugins: [
babel({