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

Polyfill IJsonSchema.examples #172

Merged
merged 2 commits into from
Apr 5, 2025
Merged

Polyfill IJsonSchema.examples #172

merged 2 commits into from
Apr 5, 2025

Conversation

samchon
Copy link
Owner

@samchon samchon commented Apr 5, 2025

Even though JSON schema's examples property must be Record<string, any> type, too much people and frameworks are filling the property with array value.

Considering the specification, this PR is not proper, but as industry players are following the specification, I've determined to allow for the compatibility.

Even though JSON schema's `examples` property must be `Record<string, any>` type, too much people and frameworks are filling the property with array value.

Considering the specification, this PR is not proper, but as industry players are following the specification, I've determined to allow for the compatibility.
@samchon samchon added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 5, 2025
@samchon samchon requested a review from Copilot April 5, 2025 14:43
@samchon samchon self-assigned this Apr 5, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (2)

src/converters/OpenApiV3_1Emender.ts:283

  • [nitpick] The conversion uses a key prefix 'e' for examples; consider using a more descriptive and consistent prefix that aligns with similar conversions elsewhere.
examples: Array.isArray(input.examples)

src/converters/OpenApiV3Upgrader.ts:261

  • [nitpick] The new conversion uses a key prefix 'v' for examples; it would be beneficial to standardize the key prefix across converters to maintain consistency.
examples: input.examples,

@samchon samchon changed the title Make examples compatible. Polyfill IJsonSchema.examples Apr 5, 2025
@samchon samchon merged commit dc48dab into master Apr 5, 2025
4 checks passed
@samchon samchon deleted the feat/examples branch April 5, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant