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

fix(cli): openapi importer supports a setting for making additional properties optional #4667

Merged
merged 4 commits into from
Sep 17, 2024

Conversation

dsinghvi
Copy link
Member

@dsinghvi dsinghvi commented Sep 17, 2024

…onal additional properties

This PR introduces a new feature to allow additional properties in OpenAPI to be optional.

Changes

  • The optionalAdditionalProperties field is added to the APIDefinitionSettings interface.
  • The optionalAdditionalProperties field is added to the SpecImportSettings interface.
  • The optionalAdditionalProperties field is added to the ParseOpenAPIOptions interface.
  • The optionalAdditionalProperties field is added to the OSSWorkspace.Settings interface.
  • The optionalAdditionalProperties field is added to the Workspace interface.
  • The optionalAdditionalProperties field is added to the OpenAPISettingsSchema and AsyncAPISettingsSchema objects.
  • The optionalAdditionalProperties field is added to the OpenAPISpecSchema and AsyncAPISchema objects.
  • The optionalAdditionalProperties field is added to the parseAPIConfigurationToApiLocations function.
  • The optionalAdditionalProperties field is added to the convertAdditionalProperties function.
  • The optionalAdditionalProperties field is added to the loadSingleNamespaceAPIWorkspace function.

@dsinghvi dsinghvi requested a review from amckinney September 17, 2024 12:58
@@ -9,11 +9,14 @@ export interface ParseOpenAPIOptions {
useTitlesAsName: boolean;
/* The audiences that the OpenAPI must be filtered down into */
audiences: string[] | undefined;
/* Whether or not to make additional proeprties optional */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Whether or not to make additional proeprties optional */
/* Whether or not to make additional properties optional */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also make this slightly more clear and say "... property values optional".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, thank you!

@dsinghvi dsinghvi force-pushed the dsinghvi/add-optional-additional-properties-flag branch from 8cb6dd1 to 2468515 Compare September 17, 2024 13:30
@dsinghvi dsinghvi enabled auto-merge (squash) September 17, 2024 13:31
@dsinghvi dsinghvi merged commit 0d037c2 into main Sep 17, 2024
46 checks passed
@dsinghvi dsinghvi deleted the dsinghvi/add-optional-additional-properties-flag branch September 17, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants