-
-
Notifications
You must be signed in to change notification settings - Fork 322
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: Support for multiple response content-types see #436 #439
base: main
Are you sure you want to change the base?
Conversation
May as well include here a patch for #437 which uses your patterns for |
|
||
let ctSchema = contentType.schema; | ||
if (ctSchema) { | ||
entry.type = ctSchema.type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superfluous.
I guess is nice having format
as well but seeing we're using ctSchema.type
below this point and entry.originalType
is being set, there is no need to assign entry.type
.
Thanks, looking forward to seeing the final version. Where (say) a JSON and XML response contentType refer to the same schema, I'd rather not duplicate it in the output markdown if possible... |
The
In this inline example the
If they were the same you'd probably link them to the same
I'm looking at an endpoint where one response is an inline PDF (
|
Perhaps you're wishing to hide the That would probably take 2 tables in Might be a bridge too far, sounds like a visual improvement which someone else might wish to add. I'm just wishing to fix the bugs:
It just needs to display stuff which meets OpenAPI spec, prettifying it by removing keys which are considered noisy is something else. |
Yes, I know how the OAS is structured 😄
Exactly this. Merge the contentTypes but show multiple (two in this case) examples in the code blocks (which get put in the right-hand column in Slate).
That's fair.
Agreed, we can iterate on top of this PR, and keep it focussed. |
It could be this simple.
However
code
anddescription
are in the outer object and don't require calculation each loop.I'll push another commit which does the logic on those first then reuses the result for the inner loop.