Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Open API definition is not valid #4

Open
deniurchak opened this issue Jun 28, 2023 · 0 comments
Open

The Open API definition is not valid #4

deniurchak opened this issue Jun 28, 2023 · 0 comments

Comments

@deniurchak
Copy link

I am trying to generated a Go client from the Open API v3 spec. I am using this tool https://github.com/deepmap/oapi-codegen .
I copied the Open Api spec to a local file named openapi.yaml. The open api spec validator showed several errors:

  • use of properties in ListPushCredentialsResponse
  • use of summary in AutorespConfigsResponseSchema
  • descending in CreateTeXMLSecretRequest
  • required in EnqueueRequest
    etc.

I fixed these errors manually and ran this command oapi-codegen -include-tags Documents,'Porting Order','Phone Number Orders' -generate types,client,spec -package generated_telnyx ./telnyx/openapi.yaml > ./telnyx/generated/telnyx.gen.go gives the following error:

error loading swagger spec in ./telnyx/openapi.yaml
: bad data in "#/components/parameters/ConnectionId" (expecting ref to schema object)make: *** [generate-oapi-telnyx] Error 1

I think the errors are related to the use of refs in several places. Would be great if you could take a look at it and see if it is possible to generate a client from an existing spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant