Git Product home page Git Product logo

Comments (8)

ad-on-is avatar ad-on-is commented on June 2, 2024 1

You're lucky I'm bored right now. AutoSwagger.json() is now implemented in version 2.14.x 😅 See the docs.

from adonis-autoswagger.

ad-on-is avatar ad-on-is commented on June 2, 2024

Currently, not. What would be the use case?

from adonis-autoswagger.

FabriceGaillard avatar FabriceGaillard commented on June 2, 2024

To parse data, to filter it depending on some conditions

from adonis-autoswagger.

ad-on-is avatar ad-on-is commented on June 2, 2024

docs() returns a stringified YAML. You should be able convert it back into json.

from adonis-autoswagger.

FabriceGaillard avatar FabriceGaillard commented on June 2, 2024

Yes, i could use a package for this, but don't you convert js to yaml in this package? It Can be interesting to add in the options the output format wanted eventually.

from adonis-autoswagger.

ad-on-is avatar ad-on-is commented on June 2, 2024

Yes, I do convert it, and it additionally saves a swagger.yaml file, which is used in production mode.

When you run the adonisJS app in dev mode, everything works seamlessly. However, when you deploy it to production, you MUST execute node ace docs:generate command, to generate the swagger.yml file, since in production you obviously don't have all the necessary references to the *.ts files and their comments, etc.

In this case, Autoswagger would have to create two file, swagger.yaml and swagger.json, to make it production ready.

from adonis-autoswagger.

FabriceGaillard avatar FabriceGaillard commented on June 2, 2024

Ok thx for the explanations. I think it could be a good option to have the choose of the output format. Autoswagger would have to create only one file depending of options defined in config/swagger.ts

from adonis-autoswagger.

FabriceGaillard avatar FabriceGaillard commented on June 2, 2024

Thx!

from adonis-autoswagger.

Related Issues (20)

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.