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.
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:propertiesinListPushCredentialsResponsesummaryinAutorespConfigsResponseSchemadescendinginCreateTeXMLSecretRequestrequiredinEnqueueRequestetc.
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.gogives the following error:I think the errors are related to the use of
refsin 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.