PHP8 Attributes #165
Replies: 5 comments 2 replies
|
Ah, yeah I think this could be very useful. I'm not very familiar with the new Attribute system, and its been quite some time since I defined OpenAPI markup for a PHP project. Would I need to add a dependency on zircote/swagger-php, or can this be done with the built-in PHP8 Attribute classes? |
|
Attributes are native to PHP from version 8: https://www.php.net/manual/en/language.attributes.overview.php |
|
@PaulHendriks I have made a quick PR to add attribute property annotations to the output classes: https://github.com/dcarbone/php-fhir/pull/166/files Is this sufficient for your needs, or were you thinking of something different? |
|
Yes, this looks like what i can use for our project 👍 |
|
@PaulHendriks I have released v4.0.0-rc6 with this output. Let me know if you run into any issues! |
Uh oh!
There was an error while loading. Please reload this page.
I'd be nice to have PHP8 attributes with each model, so we can parse it in our online Swagger api documentation.
Is this something that you'd consider building into the builder?
All reactions