@Test
	void shouldDefineComponentsSecuritySchemesForOAuth2() throws Exception {
		mockMvc
				.perform(get("/api-docs"))
				.andExpect(status().isOk())
				.andExpect(jsonPath("$.security[2].oAuthScheme", is(new ArrayList<String>())))
				.andExpect(jsonPath("$.components.securitySchemes.oAuthScheme.type", is("oauth2")))
				.andExpect(jsonPath("$.components.securitySchemes.oAuthScheme.description", is("This API uses OAuth 2 with the implicit grant flow. [More info](https://api.example.com/docs/auth)")))
				.andExpect(jsonPath("$.components.securitySchemes.oAuthScheme.flows.implicit.authorizationUrl", is("https://api.example.com/oauth2/authorize")))
				.andExpect(jsonPath("$.components.securitySchemes.oAuthScheme.flows.implicit.scopes.read_pets", is("read your pets")))
				.andExpect(jsonPath("$.components.securitySchemes.oAuthScheme.flows.implicit.scopes.write_pets", is("modify pets in your account")))
		;
	}
Given: Bean configuration with security scheme OAuth2
When: Get api-docs
Then: Return security definitions with OAuth

@throws Exception the exception
springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java