forked from loafle/openapi-generator-original
Fix scopes generation for multiple oauth flows (#7615)
* Fixed generation of oauth2 scopes for multiple oauth2 flows * Fixed locale in string format Co-authored-by: Jim Schubert <james.schubert@gmail.com>
This commit is contained in:
@@ -192,8 +192,9 @@ public interface FakeApi {
|
||||
* or User not found (status code 404)
|
||||
*/
|
||||
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = {
|
||||
|
||||
@Authorization(value = "http_basic_test")
|
||||
}, tags={ "fake", })
|
||||
}, tags={ "fake", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||
@ApiResponse(code = 404, message = "User not found") })
|
||||
@@ -315,9 +316,8 @@ public interface FakeApi {
|
||||
@ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
@PostMapping(
|
||||
|
||||
@@ -31,8 +31,9 @@ public interface FakeClassnameTestApi {
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
|
||||
|
||||
@Authorization(value = "api_key_query")
|
||||
}, tags={ "fake_classname_tags 123#$%^", })
|
||||
}, tags={ "fake_classname_tags 123#$%^", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||
@PatchMapping(
|
||||
|
||||
@@ -35,9 +35,8 @@ public interface PetApi {
|
||||
@ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 405, message = "Invalid input") })
|
||||
@@ -59,9 +58,8 @@ public interface PetApi {
|
||||
@ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 400, message = "Invalid pet value") })
|
||||
@@ -82,9 +80,8 @@ public interface PetApi {
|
||||
@ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||
@ApiResponse(code = 400, message = "Invalid status value") })
|
||||
@@ -107,9 +104,8 @@ public interface PetApi {
|
||||
@ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||
@ApiResponse(code = 400, message = "Invalid tag value") })
|
||||
@@ -130,8 +126,9 @@ public interface PetApi {
|
||||
* or Pet not found (status code 404)
|
||||
*/
|
||||
@ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
||||
|
||||
@Authorization(value = "api_key")
|
||||
}, tags={ "pet", })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@@ -155,9 +152,8 @@ public interface PetApi {
|
||||
@ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@@ -181,9 +177,8 @@ public interface PetApi {
|
||||
@ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input") })
|
||||
@PostMapping(
|
||||
@@ -204,9 +199,8 @@ public interface PetApi {
|
||||
@ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
@PostMapping(
|
||||
|
||||
@@ -49,8 +49,9 @@ public interface StoreApi {
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
||||
|
||||
@Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
}, tags={ "store", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
|
||||
@GetMapping(
|
||||
|
||||
Reference in New Issue
Block a user