fix: Support for multiple response content-types see #436#439
fix: Support for multiple response content-types see #436#439mryellow wants to merge 4 commits intoMermade:mainfrom
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.
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
codeanddescriptionare 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.