cancel
Showing results for 
Search instead for 
Did you mean: 

Missing a receive token call in the generated client

Highlighted
Visitor

Missing a receive token call in the generated client

Hello,

I have the following part for securityDefinition in my swagger 2.0 API definition:

securityDefinitions:
  petstore_auth:
    type: "oauth2"
    tokenUrl: "http://petstore.swagger.io/oauth/dialog"
    flow: "password"
    scopes:
      write:pets: "modify pets in your account"
      read:pets: "read your pets"

With this API definition I generate a C# API Client with the online Swagger Editor Tool. The generated client code does not include an API call to receive the token from the given Url "http://petstore.swagger.io/oauth/dialog". 

 

What am I missing here?

 

Thanks in advance,

David

3 REPLIES 3
Highlighted
New Member

Re: Missing a receive token call in the generated client

Same issue here with Bearer scheme (JWT) or API_key

I've followed the 'official' instructions here : https://swagger.io/docs/specification/authentication/bearer-authentication/

Nothing regarding Authentication is generated in last 2 versions of NSwagStudio (either TypeScript or C# client/controller)

Highlighted
Staff

Re: Missing a receive token call in the generated client

Highlighted
Community Manager

Re: Missing a receive token call in the generated client

@David_Haas  please let us know whether the suggestion helped!


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video: