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

Why Derive Macro utoipa::Component does not support field description #198

Closed
shenopkss opened this issue Jun 28, 2022 · 2 comments
Closed

Comments

@shenopkss
Copy link

Hope support, Thank you very much!

@juhaku
Copy link
Owner

juhaku commented Jun 28, 2022

You probably mean that the fields of a Component which in turn are also Components does not retain the doc comment? In this case this is a duplicate to this one: #137. The thing is that the doc comments are supported for primitive types but for types that are Components it is not supported because of simply limitations of the OpenAPI 3.0 spec standard.

Yes that is not actually bug but unimplemented by desing. Since OpenAPI 3.0 version does not have description or summary in fields which are references to another components. See here https://swagger.io/specification/#reference-object. For each type having field of Component the OpenAPI represents them as a $ref which does not have the aforementioned values.

It's worth note that the Swagger UI does not support newer spec than 3.0 which in turn does not leave a room for an improvement untill the Swagger UI itself will start support the 3.1 spec standard.

@juhaku
Copy link
Owner

juhaku commented Nov 3, 2022

Closing due inactivity.

@juhaku juhaku closed this as completed Nov 3, 2022
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

No branches or pull requests

2 participants