-
-
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
Response schema not properly linked #181
Comments
Your OAS document doesn't look completely valid for v3. response objects should have a content map containing media-type keys. On my phone at the moment but I can expand a bit tomorrow. |
Awww. Thank you @MikeRalphson! After changing to paths:
/users:
post:
description: 'Imagine all the users living for today ...'
operationId: users create
parameters:
- description: Foo bar
in: body
name: body
required: true
schema:
$ref: '#/components/schemas/FooBodySchema'
responses:
200:
description: response for 200 code
content:
application/json:
schema:
$ref: '#/components/schemas/FooBodySchema'
security:
- APIKeyHeader: []
summary: Register user
tags:
- Legacy API
x-extension: value things are working smoothly. :) |
One question though. The spec says, I can describe different content types in this way: responses:
200:
description: response for 200 code
content:
application/json:
schema:
$ref: '#/components/schemas/FooBodySchema'
text/plain:
schema:
type: string Looks like this scenario is merged to the last one, resulting in that Markdown snippet: |Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|response for 200 code|string| I guess this is a limitation of widdershins? |
@mryellow PRs welcome. |
Yeah it's likely I'll be getting onto this one. Will finish working up the JSON part of my setup then move onto the markdown/html. |
Thank you, much appreciated! |
Description
When having a OpenAPI 3.0 schema with a response schema, the response schema is not properly linked.
To Reproduce
Assuming this OpenAPI definition
We will get this Markdown part rendered
Expected behavior
I would love to see the proper schema linked like so:
Screenshots
Same thing further processed to Slate, will cause this HTML
(bottom right is the missing schema)
Versions:
Additional context
My commandline is
Any help is appreciated. If I'm doing wrong, please tell me. If this is a bug, maybe you can give some pointers, so I can try to create a PR.
Thanks! :)
The text was updated successfully, but these errors were encountered: