swagger-php icon indicating copy to clipboard operation
swagger-php copied to clipboard

Add more comprehensive attribute examples

Open hookenz opened this issue 11 months ago • 3 comments

It would great to see more comprehensive examples where attributes are used. Especially with JSON api's. I'm having trouble working it out so I'm muddling through.

That would be especially great for someone who has older world experience with PHP like me who is coming to grips with the new features, autoloading and all of that. So some really clear and simple API examples with a CRUD API.

hookenz avatar Jan 30 '25 23:01 hookenz

Fair point. Might be time to clean up all the petstore examples and reduce to just one each for annotations and attributes, respectively.

https://github.com/zircote/swagger-php/tree/master/Examples

DerManoMann avatar Jan 31 '25 01:01 DerManoMann

That would be amazing @DerManoMann !

hookenz avatar Feb 05 '25 00:02 hookenz

Any suggestions on which petstore to keep? petstore.swagger.io seems to be the most complete, although I suspect bits of the ones under swagger-spec could be added...?

DerManoMann avatar Feb 05 '25 00:02 DerManoMann

I think this one is done with:

  • moving the examples into the docs
  • adding attribute snippets for all example code in the docs

DerManoMann avatar Oct 15 '25 19:10 DerManoMann