Giter Site home page Giter Site logo

components.parameters.region.schema.enum does not contain 'en' which is the default value in openapi3 spec about openapi-specification HOT 9 CLOSED

googlemaps avatar googlemaps commented on June 25, 2024
components.parameters.region.schema.enum does not contain 'en' which is the default value in openapi3 spec

from openapi-specification.

Comments (9)

jpoehnelt avatar jpoehnelt commented on June 25, 2024

Thanks for catching this! I'll get a fix out right away. Do you mind sharing how you are using the Open API spec or the various outputs that lead you to this bug? Thanks again!

from openapi-specification.

WORMSS avatar WORMSS commented on June 25, 2024

Ran it against https://github.com/ferdikoomen/openapi-typescript-codegen
it tried to do region = 'en' but 'en' was an invalid input

from openapi-specification.

jpoehnelt avatar jpoehnelt commented on June 25, 2024

Got it. Any other issues with codegen? I'm looking to eventually generate and publish some libraries from this.

from openapi-specification.

WORMSS avatar WORMSS commented on June 25, 2024

But.... I actually had to fix a bug in the repo, since their version couldn't handle the ~1 for path argument in references... so see ferdikoomen/openapi-typescript-codegen#824 for my hack/fix

from openapi-specification.

jpoehnelt avatar jpoehnelt commented on June 25, 2024

I could add a dereferenced (resolve all $ref) spec if that seems to be an issue with codegens.

from openapi-specification.

github-actions avatar github-actions commented on June 25, 2024

🎉 This issue has been resolved in version 1.16.20 🎉

The release is available on:

Your semantic-release bot 📦🚀

from openapi-specification.

WORMSS avatar WORMSS commented on June 25, 2024

Could do. I personally think the codegens should be able to deal with the spec correctly.. I've found others which can..

The only issue is that the naming of the endpoints were really bad.. Like.. REALLY bad.. after it got spit out of the codegen.

End endpoints ended up being like

getPlacesApiService()
getPlacesApiService1()
getPlacesApiService2()
getPlacesApiService3()
getPlacesApiService4()

instead of something useful like

getPlacesTextSearch()
getPlacesDetails()

etc etc

I am unsure if that is an issue with the openapi-typescript-codegen or the spec file though. I would have to check that particular issue with other tools and see what they spit out..
Since you correctly tagged similar apis such as places/roads/streetview.. I would presume you are doing things right.

I know it handles our own api correctly, but I have not done a side by side to know 'how' these codegens decide the names of the functions

from openapi-specification.

jpoehnelt avatar jpoehnelt commented on June 25, 2024

Seems I could improve that with operationId although the fallback in the could also be improved. https://github.com/ferdikoomen/openapi-typescript-codegen/blob/830b317d0a0f6aaa97dba43818ce6d1ccc109be2/src/openApi/v3/parser/getOperation.ts#L22-L23

from openapi-specification.

WORMSS avatar WORMSS commented on June 25, 2024

It would seem you hit it perfectly..
our API has "operationId": "Card_CardAccessAdvisorByRole", and the function does seem to indicate this is what it would output if you remove non alphanumerics and run a run camelcase on it would result in cardCardAccessAdvisorByUser and that is exactly what we get.
the cardCard in our codebase is a little undesirable, but nothing to cry too much about...

Good spot with getOperation

from openapi-specification.

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.