swagger-api / swagger-api/swagger-codegen
[csharp-client] authentication does not implemented
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I have security description in my swagger, but I haven't found any security implementations in the client.
Swagger-codegen version
last commit from github
Swagger declaration file content or url
securityDefinitions:
apiKey:
type: 'apiKey'
description: 'API Key Authentication'
name: 'apiKey'
in: 'header'
oauth2:
type: 'oauth2'
description: 'OAuth2 Implicit Grant'
flow: 'implicit'
authorizationUrl: 'http://petstore.swagger.wordnik.com/api/oauth/dialog'
tokenUrl: 'https://tempuri.org/token'
scopes:
Command line used for generation
java.exe -jar $Global:swaggerJar `
generate `
-i $Global:swaggerJsonUrl `
-l csharp `
-o $Global:outputFolder `
-c $Global:config `
-t $Global:templates `
--additional-properties $json.'additional-properties'`
where $global set to my variables
Suggest a Fix
I suppose it should be similar template as for java ApiKeyAuth but not sure
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Java auth/ApiKeyAuth.mustache template and compare it with the C# client templates used by the shown generation command. Check how the provided apiKey and oauth2 security definitions are represented in the generated client; done means the generated C# client has defined behavior for those authentication schemes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100