Class OpenApiConfig
java.lang.Object
com.irurueta.authserver.bff.api.web.OpenApiConfig
Runtime OpenAPI document of the JSON API of the BFF, served by springdoc at "/v3/api-docs" to a signed-in
user. The contract
apis/bff/rest-server/bff-api-v1.yaml is the source of truth: the operations are
described by the interface generated from it, and this class only adds what springdoc cannot read from it (the
info block and the security scheme). OpenApiDriftIT fails when the document served differs from the
contract.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPath of the OpenAPI document.(package private) static final StringName of the header carrying the CSRF token.static final StringName of the CSRF security scheme, which protects every state-changing request.(package private) static final StringName of the session cookie (set bySessionConfigurationofbff/infrastructure/session).static final StringName of the session-cookie security scheme the contract's operations refer to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springdoc.core.models.GroupedOpenApiapiGroup()Groups the BFF's own JSON paths (/bff/**) and the documents API (/api/**), leaving out the OAuth 2.0 login endpoints.io.swagger.v3.oas.models.OpenAPIDescribes the API.
-
Field Details
-
API_DOCS_PATH
Path of the OpenAPI document.- See Also:
-
SESSION_SCHEME
Name of the session-cookie security scheme the contract's operations refer to.- See Also:
-
CSRF_SCHEME
Name of the CSRF security scheme, which protects every state-changing request.- See Also:
-
SESSION_COOKIE
Name of the session cookie (set bySessionConfigurationofbff/infrastructure/session).- See Also:
-
CSRF_HEADER
Name of the header carrying the CSRF token.- See Also:
-
-
Constructor Details
-
OpenApiConfig
public OpenApiConfig()
-
-
Method Details
-
bffOpenApi
@Bean public io.swagger.v3.oas.models.OpenAPI bffOpenApi()Describes the API.- Returns:
- the OpenAPI info block and security scheme.
-
apiGroup
@Bean public org.springdoc.core.models.GroupedOpenApi apiGroup()Groups the BFF's own JSON paths (/bff/**) and the documents API (/api/**), leaving out the OAuth 2.0 login endpoints.- Returns:
- the group of API paths.
-