Skip to content

Commit

Permalink
fix(cli): service level path params with docs are now supported (#5469)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Dec 23, 2024
1 parent 523965e commit d5be6f6
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fern.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2803,7 +2803,7 @@
{
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/definitions/types.TypeReferenceSchema"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion fern/apis/fern-definition/definition/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ types:
auth: boolean
url: optional<string>
base-path: string
path-parameters: optional<map<string, string>>
path-parameters: optional<map<string, types.TypeReferenceSchema>>
idempotent: optional<boolean>
headers: optional<map<string, types.TypeReferenceSchema>>
transport: optional<ServiceTransport>
Expand Down
4 changes: 4 additions & 0 deletions fern/pages/changelogs/openapi/2024-12-20.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 0.1.6
**`(fix):`** The generator now correctly handles float types when converting to OpenAPI specs.


2 changes: 1 addition & 1 deletion package-yml.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2823,7 +2823,7 @@
{
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/definitions/types.TypeReferenceSchema"
}
},
{
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/cli/versions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
- changelogEntry:
- summary: |
The CLI now handles parsing service level path parameters with descriptions.
This fixes a regression introduced in the CLI since versions 0.45.x.
type: fix
irVersion: 53
version: 0.46.12

- changelogEntry:
- summary: |
Allow for configuring the depth of example generation in API Docs. For example,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface HttpServiceSchema extends FernDefinition.DeclarationWithoutDocs
auth: boolean;
url?: string;
"base-path": string;
"path-parameters"?: Record<string, string>;
"path-parameters"?: Record<string, FernDefinition.TypeReferenceSchema>;
idempotent?: boolean;
headers?: Record<string, FernDefinition.TypeReferenceSchema>;
transport?: FernDefinition.ServiceTransport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export const HttpServiceSchema: core.serialization.ObjectSchema<
auth: core.serialization.boolean(),
url: core.serialization.string().optional(),
"base-path": core.serialization.string(),
"path-parameters": core.serialization
.record(core.serialization.string(), core.serialization.string())
.optional(),
"path-parameters": core.serialization.record(core.serialization.string(), TypeReferenceSchema).optional(),
idempotent: core.serialization.boolean().optional(),
headers: core.serialization.record(core.serialization.string(), TypeReferenceSchema).optional(),
transport: ServiceTransport.optional(),
Expand All @@ -37,7 +35,7 @@ export declare namespace HttpServiceSchema {
auth: boolean;
url?: string | null;
"base-path": string;
"path-parameters"?: Record<string, string> | null;
"path-parameters"?: Record<string, TypeReferenceSchema.Raw> | null;
idempotent?: boolean | null;
headers?: Record<string, TypeReferenceSchema.Raw> | null;
transport?: ServiceTransport.Raw | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2803,7 +2803,7 @@
{
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/definitions/types.TypeReferenceSchema"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2823,7 +2823,7 @@
{
"type": "object",
"additionalProperties": {
"type": "string"
"$ref": "#/definitions/types.TypeReferenceSchema"
}
},
{
Expand Down

0 comments on commit d5be6f6

Please sign in to comment.