go-openapi / spec

openapi specification object model
Apache License 2.0
389 stars 98 forks source link

Description for API Key Security Scheme #151

Closed pomaretta closed 2 years ago

pomaretta commented 2 years ago

Show a short description or tip for help the user enter correctly the API Key.

This is now supported but not used.

Current:

// APIKeyAuth creates an api key auth security scheme
func APIKeyAuth(fieldName, valueSource) *SecurityScheme {
    return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{Type: apiKey, Name: fieldName, In: valueSource}}
}

Maybe is not common to show up a description for API Key authentication, but the current implementation does not allow to use it.