Skip to content

Commit

Permalink
fix: actually get extra-properties wired up in fdr
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Oct 10, 2024
1 parent a474563 commit e406944
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions fern/apis/fdr/definition/api/v1/read/type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ types:
properties:
extends: list<rootCommons.TypeId>
properties: list<ObjectProperty>
extraProperties: optional<TypeReference>

ObjectProperty:
extends:
Expand Down
1 change: 1 addition & 0 deletions fern/apis/fdr/definition/api/v1/register/type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ types:
properties:
extends: list<rootCommons.TypeId>
properties: list<ObjectProperty>
extraProperties: optional<TypeReference>

ObjectProperty:
extends:
Expand Down
3 changes: 2 additions & 1 deletion packages/fdr-sdk/src/api-definition/migrators/v1ToV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ export class ApiDefinitionV1ToLatest {
type: "object",
extends: value.extends,
properties: this.migrateObjectProperties(value.properties),
extraProperties: undefined,
extraProperties:
value.extraProperties != null ? this.migrateTypeReference(value.extraProperties) : undefined,
}),
alias: (value) => ({
type: "alias",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ function transformShape({ writeShape }: { writeShape: APIV1Write.TypeShape }): F
type: "object",
extends: writeShape.extends,
properties: writeShape.properties.map((property) => transformProperty({ writeShape: property })),
extraProperties: writeShape.extraProperties,
};
case "alias":
return {
Expand Down Expand Up @@ -644,6 +645,7 @@ function transformDiscriminatedVariant({
properties: writeShape.additionalProperties.properties.map((property) =>
transformProperty({ writeShape: property }),
),
extraProperties: undefined,
},
};
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e406944

Please sign in to comment.