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

Add support for examples in OpenAPI block #2314

Merged
merged 8 commits into from
Jun 20, 2024
Merged

Conversation

vibhanshub
Copy link
Contributor

@vibhanshub vibhanshub commented May 14, 2024

Same description as #2313

Copy link

argos-ci bot commented May 14, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 5 changed Jun 20, 2024, 10:29 AM

Copy link

@Eloutmanixx Eloutmanixx left a comment

Choose a reason for hiding this comment

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

xxxxxxxxxx

Copy link
Member

@SamyPesse SamyPesse left a comment

Choose a reason for hiding this comment

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

IMO it can't be merged in the current state and it requires more work:

  • Properly support non-primitive values?
    • should we represent with JSON.stringify? If yes, it'll not work well for XML/etc API
    • should we skip non-primitives using typeof schema.example === 'string' || typeof schema.example === 'number' || typeof schema.example === 'boolean'?
  • Should we handle examples as well by selecting the first example or the one matching the media-type?

packages/react-openapi/src/OpenAPISchema.tsx Outdated Show resolved Hide resolved
packages/react-openapi/src/OpenAPISchema.tsx Outdated Show resolved Hide resolved
src/components/DocumentView/OpenAPI/style.css Outdated Show resolved Hide resolved
packages/react-openapi/src/OpenAPISchema.tsx Outdated Show resolved Hide resolved
packages/react-openapi/src/OpenAPISchema.tsx Outdated Show resolved Hide resolved
packages/react-openapi/src/OpenAPISchema.tsx Outdated Show resolved Hide resolved
packages/react-openapi/src/OpenAPISpec.tsx Show resolved Hide resolved
packages/react-openapi/src/OpenAPISchema.tsx Outdated Show resolved Hide resolved
@daskinw
Copy link

daskinw commented Jun 20, 2024

@SamyPesse this is blocking for an ICP customer going live with their API docs. I think Vib made the requested changes. Can we get it to move?

packages/react-openapi/src/OpenAPISchema.tsx Outdated Show resolved Hide resolved
@vibhanshub vibhanshub merged commit 106cbbd into main Jun 20, 2024
7 of 8 checks passed
@vibhanshub vibhanshub deleted the add-example-openapi branch June 20, 2024 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants