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

feat(cli): Add inline property to type references from properties in Fern definition with OpenAPI importer #5248

Merged
merged 26 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d6277e8
Allow inline type reference inside Fern def object properties
Swimburger Nov 21, 2024
c54be62
Add inline support for OpenAPI parser to fern
Swimburger Nov 21, 2024
005e830
Handle optional inline types to inline IR
Swimburger Nov 21, 2024
00504ec
rename method
Swimburger Nov 21, 2024
ddb3819
Add support for inlining types into requests from OpenAPI and Fern de…
Swimburger Nov 22, 2024
7855829
Update inline types test definition with an inline request body
Swimburger Nov 22, 2024
37eb122
Remove inline from response
Swimburger Nov 22, 2024
49b79b1
update jsonschemas
Swimburger Nov 22, 2024
2e65f4d
move inline into Fern type declaration
Swimburger Nov 23, 2024
c706f87
Configure inline on the type references
Swimburger Nov 25, 2024
8e7c633
Merge branch 'main' of https://github.com/fern-api/fern into niels/cl…
Swimburger Nov 25, 2024
8ced0f6
Test updated after merge from main
Swimburger Nov 25, 2024
1505a30
Revert "Configure inline on the type references"
Swimburger Nov 25, 2024
5900da2
Deprecate inline property on NamedType
Swimburger Nov 25, 2024
f1eec66
Undo unnecessary changes
Swimburger Nov 25, 2024
cf3aec6
remove assemblyai-api-spec submodule
Swimburger Nov 25, 2024
05fd611
pnpm test update
Swimburger Nov 25, 2024
756f5fa
Update test definitions to include enum and (un)discriminated unions
Swimburger Nov 25, 2024
c0e8130
Merge branch 'main' of https://github.com/fern-api/fern into niels/cl…
Swimburger Nov 26, 2024
64227b1
Move inline to BaseTypeDeclarationSchema in Fern definition, remove r…
Swimburger Nov 26, 2024
002baf2
Add versions.yml entry
Swimburger Nov 26, 2024
bd7af57
chore: update changelog
fern-bot Nov 26, 2024
4bb0d1e
Merge branch 'main' of https://github.com/fern-api/fern into niels/cl…
Swimburger Nov 27, 2024
33cbc78
test update
Swimburger Nov 27, 2024
1f13943
Merge branch 'main' of https://github.com/fern-api/fern into niels/cl…
Swimburger Nov 27, 2024
8459ce8
chore: update changelog
fern-bot Nov 27, 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
40 changes: 40 additions & 0 deletions fern.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"extends": {
"oneOf": [
{
Expand Down Expand Up @@ -733,6 +743,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"default": {
"oneOf": [
{
Expand Down Expand Up @@ -1066,6 +1086,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"discriminant": {
"oneOf": [
{
Expand Down Expand Up @@ -1222,6 +1252,16 @@
}
]
},
"inline": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"discriminated": {
"const": false
},
Expand Down
56 changes: 30 additions & 26 deletions fern/apis/fern-definition/definition/commons.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
imports:
imports:
availability: availability.yml

types:
WithDocsSchema:
properties:
types:
WithDocsSchema:
properties:
docs: optional<string>
WithName:
properties:

WithName:
properties:
name: optional<string>
WithAvailability:
properties:

WithAvailability:
properties:
availability: optional<availability.AvailabilityUnionSchema>
WithDisplayName:
properties:

WithDisplayName:
properties:
display-name: optional<string>
WithAudiences:
properties:

WithAudiences:
properties:
audiences: optional<list<string>>

DeclarationSchema:
extends:

WithInline:
properties:
inline: optional<boolean>

DeclarationSchema:
extends:
- WithDocsSchema
- WithAvailability
- WithAudiences
DeclarationWithoutDocsSchema:
extends:

DeclarationWithoutDocsSchema:
extends:
- WithAvailability
- WithAudiences
DeclarationWithNameSchema:
extends:

DeclarationWithNameSchema:
extends:
- DeclarationSchema
- WithName
- WithName
Loading
Loading