Git Product home page Git Product logo

Comments (5)

christianhelle avatar christianhelle commented on July 21, 2024

@vinaymadupathi Thanks for taking the time to report this. I'll see what I can do.

I will most likely not just enforce a number or integer default format because that would be a breaking change, but this could be specified as a command line argument instead. I'll look into what would be best

from refitter.

christianhelle avatar christianhelle commented on July 21, 2024

@all-contributors please add @vinaymadupathi for bugs

from refitter.

allcontributors avatar allcontributors commented on July 21, 2024

@christianhelle

I've put up a pull request to add @vinaymadupathi! 🎉

from refitter.

kirides avatar kirides commented on July 21, 2024

I'd argue that just using "type": "integer" is a bad openapi spec and should be fixed to include appropriate "format": "int64" / "decimal" / "int32" etc.

if this comes from an external source, it would be wise to tell the creator of the spec about the flaw in the openapi doc.

from refitter.

christianhelle avatar christianhelle commented on July 21, 2024

I'd argue that just using "type": "integer" is a bad openapi spec and should be fixed to include appropriate "format": "int64" / "decimal" / "int32" etc.

I agree this is the correct course of action to take in this situation.

if this comes from an external source, it would be wise to tell the creator of the spec about the flaw in the openapi doc.

I've dealt with quite a lot of these bad OpenAPI specs myself, and when it comes to large corporate vendors, I noticed that informing them that there are errors in the spec doesn't necessarily mean that anything will be done about it. The worst case is that it remains as it is or gets fixed in a future release. You have probably tried this as well @kirides

In these cases, I take a copy of the spec and adjust it locally. At the end of the day, HTTP API's use JSON, and there are only 3 primitive data types in JSON, so regardless of what numeric data type you use in C# it will always come out as a number

I'm guessing that the use case of @vinaymadupathi is to use tooling to skip adjusting the OpenAPI spec locally. Is this correct?

from refitter.

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.