Giter VIP home page Giter VIP logo

Comments (5)

zxchris avatar zxchris commented on May 18, 2024

Yes, that will be inconvenient!
The intention was for these to be ordered alphabetically, so that they are consistent. Ideally, I would like them to maintain the order in the specification but, alas, they're defined as a map in the JSON spec, not an array, so ordering can't be guaranteed. We found forcing alphabetical ordering for such things looks "right" to the reader.

However, this seems to have been overlooked (or broken!) on the summary pages.

Thanks for the report.
Will fix!

from dapperdox.

liborjelinek avatar liborjelinek commented on May 18, 2024

Thanks for your interest! Yes, that's a pitty that's JSON object with not guaraned ordering, not list.

But as ideal I consider adding another x- extension to Swagger file. Good name IMHO would be x-sortOrder to be consistent with SortOrder metadata with identical semantics - value coud be alphanumeric string however usually users will pick numeric values (where smaller number means bigger priority).

Alphabetically sorting would be a "fallback" if x-sortOrder is missing.

I also think how to handle if some operations have x-sortOrder and some miss it... How do you handle with it in the case of SortOrder? Again, let's implement it with identical behaviour.

from dapperdox.

zxchris avatar zxchris commented on May 18, 2024

We're looking at this at the moment and would appreciate any feedback you may have on our comments/suggestions on pull-request #68 before we implement (or merge) a solution.

from dapperdox.

Kerzman avatar Kerzman commented on May 18, 2024

Hey, we are facing the same issue,
any news about this PR?

from dapperdox.

zxchris avatar zxchris commented on May 18, 2024

We've implemented this in version 1.2.0. See controlling method order

from dapperdox.

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.