-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
openapi enum support #123
openapi enum support #123
Conversation
Sure, good idea! |
0e9e635
to
d5413f2
Compare
Fixed. |
d5413f2
to
c888f1b
Compare
Added enum test case. |
c888f1b
to
81480ba
Compare
Regarding RDF, there is This can also be interesting:
|
Maybe the best course of action would be to have a full Hydra enum support in API Platform before doing it here since we don't really know how it will be done. |
81480ba
to
15e684b
Compare
Fixed for openapi, and added enum support with test case to swagger, as I figured out it share same syntax (openapi-types). |
I think that in a case of openapi/swagger on parser level there is not much room to move, enums are simple lists and that is all. I would be nice to cover it by api-doc-parser to have some method to cope with it some how just now without waiting for full integrated hydra solution, that I guess would be resolved mostly in core and admin components. |
74ae874
to
6754afa
Compare
6754afa
to
63cdb32
Compare
Thank you @PawelSuwinski! |
This is the opening of a discussion or a proposition of enum keyword support, at the moment only for openapi, I haven't explored how it could be realized in hydra or swagger.
If OpenApi docs contains enum property (api-platform, decorated
api_platform.metadata.property.metadata_factory service
) SwaggerUI renders it automatically in a nice way, for example:but there is no way to get into it on any level using @api-platform/admin or @api-platform/api-doc-parser, docs need to be parsed again manually.
With this small change I can already have some EnumInput without need of parsing openapi json by hand: