You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finally after quite some time (this issue was opened in 2018!), we have support for Enums in OpenAPI, REST and GraphQL. Both Doctrine ORM and ODM have support for enums through enumType which is supported by API Platform 3.0. Alan added their support over OpenAPI and GraphQL.
I didn't found anything about how to expose PHP's enum in the actual APIP3.1 doc (I may be blind!), if there's not isn't a good idea to adapt/translate/implement the above blogpost in the doc? I may work on it (as I will implement it few times in a personal project), so I can totally do this, I just need to know of this is the right direction, and if it's needed.
Let me know,
Best regards,
The text was updated successfully, but these errors were encountered:
Hello,
No it's not related to the post. It works out of the box: if you use an enum in your resource, it will be used for the OpenAPI and GraphQL schema. I don't think a documentation is necessary for this case.
If you want to expose your enum as a resource, then you can follow the blog post. maybe we can write a documentation about it in this case.
No it's not related to the post. It works out of the box: if you use an enum in your resource, it will be used for the OpenAPI and GraphQL schema. I don't think a documentation is necessary for this case.
Ok, I don't understand what changed since 3.0 so ^^ and how it works, therefore I can't write any doc about this new feature :/
If you want to expose your enum as a resource, then you can follow the blog post. maybe we can write a documentation about it in this case.
Let's go for this, I'll propose a new page. PR will come!
Hello, thank you for the work!
In the 3.1 release news, you said:
I would like to know more about enums, is it related to this post https://les-tilleuls.coop/blog/exposez-vos-enums-avec-api-platform ?
I didn't found anything about how to expose PHP's enum in the actual APIP3.1 doc (I may be blind!), if there's not isn't a good idea to adapt/translate/implement the above blogpost in the doc? I may work on it (as I will implement it few times in a personal project), so I can totally do this, I just need to know of this is the right direction, and if it's needed.
Let me know,
Best regards,
The text was updated successfully, but these errors were encountered: