Git Product home page Git Product logo

Comments (4)

vanderlee avatar vanderlee commented on June 19, 2024

I think that would be quite doable. Will look into it somewhere in the coming weeks.
Do you know if the SwaggerUI can handle examples.

from phpswaggergen.

oozolii avatar oozolii commented on June 19, 2024

Thank you very much! SwaggerUI can handle examples.
Check here in the example:
http://petstore.swagger.io/?_ga=2.136686704.1540059357.1509039902-598612444.1509039902

And here is the json for that: http://petstore.swagger.io/v2/swagger.json

The "example" shows up in the UI when you see eg. the "Add a new pet to the store" body options object.

from phpswaggergen.

vanderlee avatar vanderlee commented on June 19, 2024

I've added support for example to all types and to the Response context.

Note that PHPSwaggerGen bases off the 2.0 spec. Relevant page on examples is here: https://swagger.io/docs/specification/2-0/adding-examples/.

The page you linked to was for OAS3. I may support 3.0 in the future, but currently have no plans to do so.

from phpswaggergen.

oozolii avatar oozolii commented on June 19, 2024

Thank you very much!

from phpswaggergen.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.