mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 01:12:43 +00:00
[Java][Rest-assured] Fix "invokerPackage" in ApiClient, remove unnecessary @Authorization (#822)
This commit is contained in:
committed by
Jérémie Bresson
parent
ca651becf8
commit
e7340bfe5b
@@ -49,7 +49,9 @@ public class AnotherFakeApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" })
|
||||
@ApiOperation(value = "To test special tags",
|
||||
notes = "To test special tags and operation ID starting with number",
|
||||
tags={ "$another-fake?" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
public Call123testSpecialTagsOper call123testSpecialTags() {
|
||||
|
||||
@@ -56,58 +56,72 @@ public class FakeApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake" })
|
||||
@ApiOperation(value = "",
|
||||
notes = "Test serialization of outer boolean types",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Output boolean") })
|
||||
public FakeOuterBooleanSerializeOper fakeOuterBooleanSerialize() {
|
||||
return new FakeOuterBooleanSerializeOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake" })
|
||||
@ApiOperation(value = "",
|
||||
notes = "Test serialization of object with outer number type",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Output composite") })
|
||||
public FakeOuterCompositeSerializeOper fakeOuterCompositeSerialize() {
|
||||
return new FakeOuterCompositeSerializeOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake" })
|
||||
@ApiOperation(value = "",
|
||||
notes = "Test serialization of outer number types",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Output number") })
|
||||
public FakeOuterNumberSerializeOper fakeOuterNumberSerialize() {
|
||||
return new FakeOuterNumberSerializeOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake" })
|
||||
@ApiOperation(value = "",
|
||||
notes = "Test serialization of outer string types",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Output string") })
|
||||
public FakeOuterStringSerializeOper fakeOuterStringSerialize() {
|
||||
return new FakeOuterStringSerializeOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" })
|
||||
@ApiOperation(value = "",
|
||||
notes = "For this test, the body for this request much reference a schema named `File`.",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Success") })
|
||||
public TestBodyWithFileSchemaOper testBodyWithFileSchema() {
|
||||
return new TestBodyWithFileSchemaOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "", notes = "", tags={ "fake" })
|
||||
@ApiOperation(value = "",
|
||||
notes = "",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Success") })
|
||||
public TestBodyWithQueryParamsOper testBodyWithQueryParams() {
|
||||
return new TestBodyWithQueryParamsOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" })
|
||||
@ApiOperation(value = "To test \"client\" model",
|
||||
notes = "To test \"client\" model",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
public TestClientModelOper testClientModel() {
|
||||
return new TestClientModelOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = {
|
||||
@Authorization(value = "http_basic_test")
|
||||
}, tags={ "fake" })
|
||||
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ",
|
||||
notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied") ,
|
||||
@ApiResponse(code = 404, message = "User not found") })
|
||||
@@ -115,7 +129,9 @@ public class FakeApi {
|
||||
return new TestEndpointParametersOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", tags={ "fake" })
|
||||
@ApiOperation(value = "To test enum parameters",
|
||||
notes = "To test enum parameters",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid request") ,
|
||||
@ApiResponse(code = 404, message = "Not found") })
|
||||
@@ -123,14 +139,18 @@ public class FakeApi {
|
||||
return new TestEnumParametersOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" })
|
||||
@ApiOperation(value = "test inline additionalProperties",
|
||||
notes = "",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
public TestInlineAdditionalPropertiesOper testInlineAdditionalProperties() {
|
||||
return new TestInlineAdditionalPropertiesOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" })
|
||||
@ApiOperation(value = "test json serialization of form data",
|
||||
notes = "",
|
||||
tags={ "fake" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
public TestJsonFormDataOper testJsonFormData() {
|
||||
|
||||
@@ -49,9 +49,9 @@ public class FakeClassnameTags123Api {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = {
|
||||
@Authorization(value = "api_key_query")
|
||||
}, tags={ "fake_classname_tags 123#$%^" })
|
||||
@ApiOperation(value = "To test class name in snake case",
|
||||
notes = "To test class name in snake case",
|
||||
tags={ "fake_classname_tags 123#$%^" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
public TestClassnameOper testClassname() {
|
||||
|
||||
@@ -51,36 +51,27 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "Add a new pet to the store", 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" })
|
||||
@ApiOperation(value = "Add a new pet to the store",
|
||||
notes = "",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input") })
|
||||
public AddPetOper addPet() {
|
||||
return new AddPetOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Deletes a pet", 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" })
|
||||
@ApiOperation(value = "Deletes a pet",
|
||||
notes = "",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid pet value") })
|
||||
public DeletePetOper deletePet() {
|
||||
return new DeletePetOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", 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" })
|
||||
@ApiOperation(value = "Finds Pets by status",
|
||||
notes = "Multiple status values can be provided with comma separated strings",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") ,
|
||||
@ApiResponse(code = 400, message = "Invalid status value") })
|
||||
@@ -88,12 +79,9 @@ public class PetApi {
|
||||
return new FindPetsByStatusOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", 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" })
|
||||
@ApiOperation(value = "Finds Pets by tags",
|
||||
notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") ,
|
||||
@ApiResponse(code = 400, message = "Invalid tag value") })
|
||||
@@ -102,9 +90,9 @@ public class PetApi {
|
||||
return new FindPetsByTagsOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", authorizations = {
|
||||
@Authorization(value = "api_key")
|
||||
}, tags={ "pet" })
|
||||
@ApiOperation(value = "Find pet by ID",
|
||||
notes = "Returns a single pet",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") ,
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied") ,
|
||||
@@ -113,12 +101,9 @@ public class PetApi {
|
||||
return new GetPetByIdOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Update an existing pet", 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" })
|
||||
@ApiOperation(value = "Update an existing pet",
|
||||
notes = "",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied") ,
|
||||
@ApiResponse(code = 404, message = "Pet not found") ,
|
||||
@@ -127,36 +112,27 @@ public class PetApi {
|
||||
return new UpdatePetOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Updates a pet in the store with form data", 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" })
|
||||
@ApiOperation(value = "Updates a pet in the store with form data",
|
||||
notes = "",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input") })
|
||||
public UpdatePetWithFormOper updatePetWithForm() {
|
||||
return new UpdatePetWithFormOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "uploads an image", 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" })
|
||||
@ApiOperation(value = "uploads an image",
|
||||
notes = "",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
public UploadFileOper uploadFile() {
|
||||
return new UploadFileOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "uploads an image (required)", 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" })
|
||||
@ApiOperation(value = "uploads an image (required)",
|
||||
notes = "",
|
||||
tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
public UploadFileWithRequiredFileOper uploadFileWithRequiredFile() {
|
||||
|
||||
@@ -49,7 +49,9 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store" })
|
||||
@ApiOperation(value = "Delete purchase order by ID",
|
||||
notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
|
||||
tags={ "store" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied") ,
|
||||
@ApiResponse(code = 404, message = "Order not found") })
|
||||
@@ -57,16 +59,18 @@ public class StoreApi {
|
||||
return new DeleteOrderOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", authorizations = {
|
||||
@Authorization(value = "api_key")
|
||||
}, tags={ "store" })
|
||||
@ApiOperation(value = "Returns pet inventories by status",
|
||||
notes = "Returns a map of status codes to quantities",
|
||||
tags={ "store" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
public GetInventoryOper getInventory() {
|
||||
return new GetInventoryOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", tags={ "store" })
|
||||
@ApiOperation(value = "Find purchase order by ID",
|
||||
notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
|
||||
tags={ "store" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") ,
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied") ,
|
||||
@@ -75,7 +79,9 @@ public class StoreApi {
|
||||
return new GetOrderByIdOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Place an order for a pet", notes = "", tags={ "store" })
|
||||
@ApiOperation(value = "Place an order for a pet",
|
||||
notes = "",
|
||||
tags={ "store" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") ,
|
||||
@ApiResponse(code = 400, message = "Invalid Order") })
|
||||
|
||||
@@ -49,28 +49,36 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" })
|
||||
@ApiOperation(value = "Create user",
|
||||
notes = "This can only be done by the logged in user.",
|
||||
tags={ "user" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
public CreateUserOper createUser() {
|
||||
return new CreateUserOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
|
||||
@ApiOperation(value = "Creates list of users with given input array",
|
||||
notes = "",
|
||||
tags={ "user" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
public CreateUsersWithArrayInputOper createUsersWithArrayInput() {
|
||||
return new CreateUsersWithArrayInputOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
|
||||
@ApiOperation(value = "Creates list of users with given input array",
|
||||
notes = "",
|
||||
tags={ "user" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
public CreateUsersWithListInputOper createUsersWithListInput() {
|
||||
return new CreateUsersWithListInputOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", tags={ "user" })
|
||||
@ApiOperation(value = "Delete user",
|
||||
notes = "This can only be done by the logged in user.",
|
||||
tags={ "user" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied") ,
|
||||
@ApiResponse(code = 404, message = "User not found") })
|
||||
@@ -78,7 +86,9 @@ public class UserApi {
|
||||
return new DeleteUserOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Get user by user name", notes = "", tags={ "user" })
|
||||
@ApiOperation(value = "Get user by user name",
|
||||
notes = "",
|
||||
tags={ "user" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") ,
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied") ,
|
||||
@@ -87,7 +97,9 @@ public class UserApi {
|
||||
return new GetUserByNameOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Logs user into the system", notes = "", tags={ "user" })
|
||||
@ApiOperation(value = "Logs user into the system",
|
||||
notes = "",
|
||||
tags={ "user" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") ,
|
||||
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
|
||||
@@ -95,14 +107,18 @@ public class UserApi {
|
||||
return new LoginUserOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ "user" })
|
||||
@ApiOperation(value = "Logs out current logged in user session",
|
||||
notes = "",
|
||||
tags={ "user" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
public LogoutUserOper logoutUser() {
|
||||
return new LogoutUserOper(reqSpec);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", tags={ "user" })
|
||||
@ApiOperation(value = "Updated user",
|
||||
notes = "This can only be done by the logged in user.",
|
||||
tags={ "user" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid user supplied") ,
|
||||
@ApiResponse(code = 404, message = "User not found") })
|
||||
|
||||
Reference in New Issue
Block a user