Code Monkey home page Code Monkey logo

Comments (7)

mathieujobin avatar mathieujobin commented on September 28, 2024 1

@PanosCodes Since you've rebuilt the whole Swagger implementation... Do you have any pointer?

Do we need to a config setting to maintain backward compatibility?

from apipie-rails.

PanosCodes avatar PanosCodes commented on September 28, 2024 1

I think it might be simple

  • The version part can already be handled by apipie:static_swagger_json rake task, you can pass the version you want to output for example bundle exec rake apipie:static_swagger_json\[2\].

  • For the namespace part of the problem, Apipie::Application::to_swagger_json uses Apipie::Generator::Swagger::ResourceDescriptionsCollection#filter to filter 😅 the resources for output so maybe there is an elegant way to extend that.

It seems like it can be implemented without any breaking changes.

from apipie-rails.

davidwessman avatar davidwessman commented on September 28, 2024 1

I will investigate it more tomorrow 🙂
But then it feels like it would be easiest to fix by handling it via rake-commands instead of the config?

from apipie-rails.

PanosCodes avatar PanosCodes commented on September 28, 2024 1

Correct, I don't think the configuration is the right place for that.

from apipie-rails.

mathieujobin avatar mathieujobin commented on September 28, 2024 1

Thanks for the update

from apipie-rails.

davidwessman avatar davidwessman commented on September 28, 2024

@PanosCodes It seems like no matter which version I generate, they all end up in the same file and overwrite each other.
Am I missing some configuration?

from apipie-rails.

davidwessman avatar davidwessman commented on September 28, 2024

Decided to add my namespace to the version and use the ENV["OUT"]:

OUT=./swagger/v1/namespace_a bundle exec rails apipie:static_swagger_json\[1\.namespace\_a\]
OUT=./swagger/v1/namespace_b bundle exec rails apipie:static_swagger_json\[1\.namespace\_b\]

from apipie-rails.

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.