mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 07:07:11 +00:00
[Java] [Kotlin] ignore unsupported schemes instead of throwing exception (#15817)
This commit is contained in:
@@ -35,24 +35,30 @@ fun Route.PetApi() {
|
||||
|
||||
authenticate("petstore_auth") {
|
||||
post<Paths.addPet> {
|
||||
|
||||
val principal = call.authentication.principal<OAuthAccessTokenResponse>()!!
|
||||
|
||||
|
||||
call.respond(HttpStatusCode.NotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
authenticate("petstore_auth") {
|
||||
delete<Paths.deletePet> {
|
||||
|
||||
val principal = call.authentication.principal<OAuthAccessTokenResponse>()!!
|
||||
|
||||
|
||||
call.respond(HttpStatusCode.NotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
authenticate("petstore_auth") {
|
||||
get<Paths.findPetsByStatus> {
|
||||
|
||||
val principal = call.authentication.principal<OAuthAccessTokenResponse>()!!
|
||||
|
||||
|
||||
val exampleContentType = "application/json"
|
||||
val exampleContentString = """[ {
|
||||
"photoUrls" : [ "photoUrls", "photoUrls" ],
|
||||
@@ -98,8 +104,10 @@ fun Route.PetApi() {
|
||||
|
||||
authenticate("petstore_auth") {
|
||||
get<Paths.findPetsByTags> {
|
||||
|
||||
val principal = call.authentication.principal<OAuthAccessTokenResponse>()!!
|
||||
|
||||
|
||||
val exampleContentType = "application/json"
|
||||
val exampleContentString = """[ {
|
||||
"photoUrls" : [ "photoUrls", "photoUrls" ],
|
||||
@@ -145,8 +153,10 @@ fun Route.PetApi() {
|
||||
|
||||
authenticate("api_key") {
|
||||
get<Paths.getPetById> {
|
||||
|
||||
val principal = call.authentication.principal<ApiPrincipal>()!!
|
||||
|
||||
|
||||
val exampleContentType = "application/json"
|
||||
val exampleContentString = """{
|
||||
"photoUrls" : [ "photoUrls", "photoUrls" ],
|
||||
@@ -176,24 +186,30 @@ fun Route.PetApi() {
|
||||
|
||||
authenticate("petstore_auth") {
|
||||
put<Paths.updatePet> {
|
||||
|
||||
val principal = call.authentication.principal<OAuthAccessTokenResponse>()!!
|
||||
|
||||
|
||||
call.respond(HttpStatusCode.NotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
authenticate("petstore_auth") {
|
||||
post<Paths.updatePetWithForm> {
|
||||
|
||||
val principal = call.authentication.principal<OAuthAccessTokenResponse>()!!
|
||||
|
||||
|
||||
call.respond(HttpStatusCode.NotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
authenticate("petstore_auth") {
|
||||
post<Paths.uploadFile> {
|
||||
|
||||
val principal = call.authentication.principal<OAuthAccessTokenResponse>()!!
|
||||
|
||||
|
||||
val exampleContentType = "application/json"
|
||||
val exampleContentString = """{
|
||||
"code" : 0,
|
||||
|
||||
@@ -38,8 +38,10 @@ fun Route.StoreApi() {
|
||||
|
||||
authenticate("api_key") {
|
||||
get<Paths.getInventory> {
|
||||
|
||||
val principal = call.authentication.principal<ApiPrincipal>()!!
|
||||
|
||||
|
||||
call.respond(HttpStatusCode.NotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user