Forum Discussion

pherold0923's avatar
pherold0923
New Contributor
6 years ago

securityScheme error

I'm trying to configure bearer authentication in an OpenAPI object using YAML in a Spring Boot app. Here is my YAML:

components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
security:
- bearerAuth: []

 But on application start-up, I get the following:

Failed to bind properties under 'openapi.config.components.securityschemes.bearerauth' to io.swagger.v3.oas.models.security.SecurityScheme:

Reason: Configuration property name '$ref' is not valid

Action:

Update your application's configuration

 

Any idea what my error is? Adding a name property to the above does not solve it.