#3957 - Removed hardcoded baseUrl (#3964)

This commit is contained in:
Sergey Terentyev 2019-09-28 10:41:16 +01:00 committed by William Cheng
parent 7bb3579345
commit e901132ea9
16 changed files with 36 additions and 36 deletions

View File

@ -21,7 +21,7 @@ class {{classname}}(baseUrl: String) {
{{>javadoc}} {{>javadoc}}
{{/javadocRenderer}} {{/javadocRenderer}}
def {{operationId}}({{>methodParameters}}): ApiRequest[{{>operationReturnType}}] = def {{operationId}}({{>methodParameters}}): ApiRequest[{{>operationReturnType}}] =
ApiRequest[{{>operationReturnType}}](ApiMethods.{{httpMethod.toUpperCase}}, "{{{basePath}}}", "{{{path}}}", {{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}}{{^consumes}}"application/json"{{/consumes}}) ApiRequest[{{>operationReturnType}}](ApiMethods.{{httpMethod.toUpperCase}}, baseUrl, "{{{path}}}", {{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}}{{^consumes}}"application/json"{{/consumes}})
{{#authMethods}}{{#isApiKey}}.withApiKey(apiKey, "{{keyParamName}}", {{#isKeyInQuery}}QUERY{{/isKeyInQuery}}{{#isKeyInHeader}}HEADER{{/isKeyInHeader}}) {{#authMethods}}{{#isApiKey}}.withApiKey(apiKey, "{{keyParamName}}", {{#isKeyInQuery}}QUERY{{/isKeyInQuery}}{{#isKeyInHeader}}HEADER{{/isKeyInHeader}})
{{/isApiKey}}{{#isBasic}}.withCredentials(basicAuth) {{/isApiKey}}{{#isBasic}}.withCredentials(basicAuth)
{{/isBasic}}{{/authMethods}}{{#bodyParam}}.withBody({{paramName}}) {{/isBasic}}{{/authMethods}}{{#bodyParam}}.withBody({{paramName}})

View File

@ -1 +1 @@
4.0.0-SNAPSHOT 4.1.3-SNAPSHOT

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -32,7 +32,7 @@ class PetApi(baseUrl: String) {
* @param body Pet object that needs to be added to the store * @param body Pet object that needs to be added to the store
*/ */
def addPet(body: Pet): ApiRequest[Unit] = def addPet(body: Pet): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet", "application/json") ApiRequest[Unit](ApiMethods.POST, baseUrl, "/pet", "application/json")
.withBody(body) .withBody(body)
.withErrorResponse[Unit](405) .withErrorResponse[Unit](405)
@ -45,7 +45,7 @@ class PetApi(baseUrl: String) {
* @param apiKey * @param apiKey
*/ */
def deletePet(petId: Long, apiKey: Option[String] = None): ApiRequest[Unit] = def deletePet(petId: Long, apiKey: Option[String] = None): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/json") ApiRequest[Unit](ApiMethods.DELETE, baseUrl, "/pet/{petId}", "application/json")
.withPathParam("petId", petId) .withPathParam("petId", petId)
.withHeaderParam("api_key", apiKey) .withHeaderParam("api_key", apiKey)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)
@ -61,7 +61,7 @@ class PetApi(baseUrl: String) {
* @param status Status values that need to be considered for filter * @param status Status values that need to be considered for filter
*/ */
def findPetsByStatus(status: Seq[String]): ApiRequest[Seq[Pet]] = def findPetsByStatus(status: Seq[String]): ApiRequest[Seq[Pet]] =
ApiRequest[Seq[Pet]](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/findByStatus", "application/json") ApiRequest[Seq[Pet]](ApiMethods.GET, baseUrl, "/pet/findByStatus", "application/json")
.withQueryParam("status", ArrayValues(status, CSV)) .withQueryParam("status", ArrayValues(status, CSV))
.withSuccessResponse[Seq[Pet]](200) .withSuccessResponse[Seq[Pet]](200)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)
@ -77,7 +77,7 @@ class PetApi(baseUrl: String) {
* @param tags Tags to filter by * @param tags Tags to filter by
*/ */
def findPetsByTags(tags: Seq[String]): ApiRequest[Seq[Pet]] = def findPetsByTags(tags: Seq[String]): ApiRequest[Seq[Pet]] =
ApiRequest[Seq[Pet]](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/findByTags", "application/json") ApiRequest[Seq[Pet]](ApiMethods.GET, baseUrl, "/pet/findByTags", "application/json")
.withQueryParam("tags", ArrayValues(tags, CSV)) .withQueryParam("tags", ArrayValues(tags, CSV))
.withSuccessResponse[Seq[Pet]](200) .withSuccessResponse[Seq[Pet]](200)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)
@ -97,7 +97,7 @@ class PetApi(baseUrl: String) {
* @param petId ID of pet to return * @param petId ID of pet to return
*/ */
def getPetById(petId: Long)(implicit apiKey: ApiKeyValue): ApiRequest[Pet] = def getPetById(petId: Long)(implicit apiKey: ApiKeyValue): ApiRequest[Pet] =
ApiRequest[Pet](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/json") ApiRequest[Pet](ApiMethods.GET, baseUrl, "/pet/{petId}", "application/json")
.withApiKey(apiKey, "api_key", HEADER) .withApiKey(apiKey, "api_key", HEADER)
.withPathParam("petId", petId) .withPathParam("petId", petId)
.withSuccessResponse[Pet](200) .withSuccessResponse[Pet](200)
@ -114,7 +114,7 @@ class PetApi(baseUrl: String) {
* @param body Pet object that needs to be added to the store * @param body Pet object that needs to be added to the store
*/ */
def updatePet(body: Pet): ApiRequest[Unit] = def updatePet(body: Pet): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.PUT, "http://petstore.swagger.io/v2", "/pet", "application/json") ApiRequest[Unit](ApiMethods.PUT, baseUrl, "/pet", "application/json")
.withBody(body) .withBody(body)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)
.withErrorResponse[Unit](404) .withErrorResponse[Unit](404)
@ -130,7 +130,7 @@ class PetApi(baseUrl: String) {
* @param status Updated status of the pet * @param status Updated status of the pet
*/ */
def updatePetWithForm(petId: Long, name: Option[String] = None, status: Option[String] = None): ApiRequest[Unit] = def updatePetWithForm(petId: Long, name: Option[String] = None, status: Option[String] = None): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/x-www-form-urlencoded") ApiRequest[Unit](ApiMethods.POST, baseUrl, "/pet/{petId}", "application/x-www-form-urlencoded")
.withFormParam("name", name) .withFormParam("name", name)
.withFormParam("status", status) .withFormParam("status", status)
.withPathParam("petId", petId) .withPathParam("petId", petId)
@ -146,7 +146,7 @@ class PetApi(baseUrl: String) {
* @param file file to upload * @param file file to upload
*/ */
def uploadFile(petId: Long, additionalMetadata: Option[String] = None, file: Option[File] = None): ApiRequest[ApiResponse] = def uploadFile(petId: Long, additionalMetadata: Option[String] = None, file: Option[File] = None): ApiRequest[ApiResponse] =
ApiRequest[ApiResponse](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet/{petId}/uploadImage", "multipart/form-data") ApiRequest[ApiResponse](ApiMethods.POST, baseUrl, "/pet/{petId}/uploadImage", "multipart/form-data")
.withFormParam("additionalMetadata", additionalMetadata) .withFormParam("additionalMetadata", additionalMetadata)
.withFormParam("file", file) .withFormParam("file", file)
.withPathParam("petId", petId) .withPathParam("petId", petId)

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -33,7 +33,7 @@ class StoreApi(baseUrl: String) {
* @param orderId ID of the order that needs to be deleted * @param orderId ID of the order that needs to be deleted
*/ */
def deleteOrder(orderId: String): ApiRequest[Unit] = def deleteOrder(orderId: String): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/store/order/{orderId}", "application/json") ApiRequest[Unit](ApiMethods.DELETE, baseUrl, "/store/order/{orderId}", "application/json")
.withPathParam("orderId", orderId) .withPathParam("orderId", orderId)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)
.withErrorResponse[Unit](404) .withErrorResponse[Unit](404)
@ -49,7 +49,7 @@ class StoreApi(baseUrl: String) {
* api_key (apiKey) * api_key (apiKey)
*/ */
def getInventory()(implicit apiKey: ApiKeyValue): ApiRequest[Map[String, Int]] = def getInventory()(implicit apiKey: ApiKeyValue): ApiRequest[Map[String, Int]] =
ApiRequest[Map[String, Int]](ApiMethods.GET, "http://petstore.swagger.io/v2", "/store/inventory", "application/json") ApiRequest[Map[String, Int]](ApiMethods.GET, baseUrl, "/store/inventory", "application/json")
.withApiKey(apiKey, "api_key", HEADER) .withApiKey(apiKey, "api_key", HEADER)
.withSuccessResponse[Map[String, Int]](200) .withSuccessResponse[Map[String, Int]](200)
@ -65,7 +65,7 @@ class StoreApi(baseUrl: String) {
* @param orderId ID of pet that needs to be fetched * @param orderId ID of pet that needs to be fetched
*/ */
def getOrderById(orderId: Long): ApiRequest[Order] = def getOrderById(orderId: Long): ApiRequest[Order] =
ApiRequest[Order](ApiMethods.GET, "http://petstore.swagger.io/v2", "/store/order/{orderId}", "application/json") ApiRequest[Order](ApiMethods.GET, baseUrl, "/store/order/{orderId}", "application/json")
.withPathParam("orderId", orderId) .withPathParam("orderId", orderId)
.withSuccessResponse[Order](200) .withSuccessResponse[Order](200)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)
@ -80,7 +80,7 @@ class StoreApi(baseUrl: String) {
* @param body order placed for purchasing the pet * @param body order placed for purchasing the pet
*/ */
def placeOrder(body: Order): ApiRequest[Order] = def placeOrder(body: Order): ApiRequest[Order] =
ApiRequest[Order](ApiMethods.POST, "http://petstore.swagger.io/v2", "/store/order", "application/json") ApiRequest[Order](ApiMethods.POST, baseUrl, "/store/order", "application/json")
.withBody(body) .withBody(body)
.withSuccessResponse[Order](200) .withSuccessResponse[Order](200)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -32,7 +32,7 @@ class UserApi(baseUrl: String) {
* @param body Created user object * @param body Created user object
*/ */
def createUser(body: User): ApiRequest[Unit] = def createUser(body: User): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user", "application/json") ApiRequest[Unit](ApiMethods.POST, baseUrl, "/user", "application/json")
.withBody(body) .withBody(body)
.withDefaultSuccessResponse[Unit] .withDefaultSuccessResponse[Unit]
@ -44,7 +44,7 @@ class UserApi(baseUrl: String) {
* @param body List of user object * @param body List of user object
*/ */
def createUsersWithArrayInput(body: Seq[User]): ApiRequest[Unit] = def createUsersWithArrayInput(body: Seq[User]): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user/createWithArray", "application/json") ApiRequest[Unit](ApiMethods.POST, baseUrl, "/user/createWithArray", "application/json")
.withBody(body) .withBody(body)
.withDefaultSuccessResponse[Unit] .withDefaultSuccessResponse[Unit]
@ -56,7 +56,7 @@ class UserApi(baseUrl: String) {
* @param body List of user object * @param body List of user object
*/ */
def createUsersWithListInput(body: Seq[User]): ApiRequest[Unit] = def createUsersWithListInput(body: Seq[User]): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user/createWithList", "application/json") ApiRequest[Unit](ApiMethods.POST, baseUrl, "/user/createWithList", "application/json")
.withBody(body) .withBody(body)
.withDefaultSuccessResponse[Unit] .withDefaultSuccessResponse[Unit]
@ -71,7 +71,7 @@ class UserApi(baseUrl: String) {
* @param username The name that needs to be deleted * @param username The name that needs to be deleted
*/ */
def deleteUser(username: String): ApiRequest[Unit] = def deleteUser(username: String): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/user/{username}", "application/json") ApiRequest[Unit](ApiMethods.DELETE, baseUrl, "/user/{username}", "application/json")
.withPathParam("username", username) .withPathParam("username", username)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)
.withErrorResponse[Unit](404) .withErrorResponse[Unit](404)
@ -86,7 +86,7 @@ class UserApi(baseUrl: String) {
* @param username The name that needs to be fetched. Use user1 for testing. * @param username The name that needs to be fetched. Use user1 for testing.
*/ */
def getUserByName(username: String): ApiRequest[User] = def getUserByName(username: String): ApiRequest[User] =
ApiRequest[User](ApiMethods.GET, "http://petstore.swagger.io/v2", "/user/{username}", "application/json") ApiRequest[User](ApiMethods.GET, baseUrl, "/user/{username}", "application/json")
.withPathParam("username", username) .withPathParam("username", username)
.withSuccessResponse[User](200) .withSuccessResponse[User](200)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)
@ -105,7 +105,7 @@ class UserApi(baseUrl: String) {
* @param password The password for login in clear text * @param password The password for login in clear text
*/ */
def loginUser(username: String, password: String): ApiRequest[String] = def loginUser(username: String, password: String): ApiRequest[String] =
ApiRequest[String](ApiMethods.GET, "http://petstore.swagger.io/v2", "/user/login", "application/json") ApiRequest[String](ApiMethods.GET, baseUrl, "/user/login", "application/json")
.withQueryParam("username", username) .withQueryParam("username", username)
.withQueryParam("password", password) .withQueryParam("password", password)
.withSuccessResponse[String](200) .withSuccessResponse[String](200)
@ -121,7 +121,7 @@ class UserApi(baseUrl: String) {
* code 0 : (successful operation) * code 0 : (successful operation)
*/ */
def logoutUser(): ApiRequest[Unit] = def logoutUser(): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.GET, "http://petstore.swagger.io/v2", "/user/logout", "application/json") ApiRequest[Unit](ApiMethods.GET, baseUrl, "/user/logout", "application/json")
.withDefaultSuccessResponse[Unit] .withDefaultSuccessResponse[Unit]
@ -136,7 +136,7 @@ class UserApi(baseUrl: String) {
* @param body Updated user object * @param body Updated user object
*/ */
def updateUser(username: String, body: User): ApiRequest[Unit] = def updateUser(username: String, body: User): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.PUT, "http://petstore.swagger.io/v2", "/user/{username}", "application/json") ApiRequest[Unit](ApiMethods.PUT, baseUrl, "/user/{username}", "application/json")
.withBody(body) .withBody(body)
.withPathParam("username", username) .withPathParam("username", username)
.withErrorResponse[Unit](400) .withErrorResponse[Unit](400)

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore * OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).