swagger-api / swagger-api/swagger-codegen

[Kotlin] Generate provides erroneous field names

Open
#10,991 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Some fields got generated with HTML entity sequences like `, even in comments.

One source of the issue is that Strapi has a field that is = by default. This is also reported to Strapi team https://github.com/strapi/strapi/issues/7219

The other is that the word in is being escaped, with backticks (As is an operator in Kotlin), but instead of generating \in`in code, is generating`in`, where `` corresponds to the actual backtick character.

Note that the replacement of both sequences yields correct code.

Example of invalid code generated:

    /**
     * 
     * 
     * @param limit Maximum number of results possible (optional)
     * @param sort Sort according to a specific field. (optional)
     * @param start Skip a specific number of entries (especially useful for pagination) (optional)
     * @param = Get entries that matches exactly your input (optional)
     * @param ne Get records that are not equals to something (optional)
     * @param lt Get record that are lower than a value (optional)
     * @param lte Get records that are lower than or equal to a value (optional)
     * @param gt Get records that are greater than a value (optional)
     * @param gte Get records that are greater than  or equal a value (optional)
     * @param contains Get records that contains a value (optional)
     * @param containss Get records that contains (case sensitive) a value (optional)
     * @param `in` Get records that matches any value in the array of values (optional)
     * @param nin Get records that doesn't match any value in the array of values (optional)
     * @return InlineResponse200
     */
    @Suppress("UNCHECKED_CAST")
    fun fileAttachmentsGet(limit: kotlin.Int? = null, sort: kotlin.String? = null, start: kotlin.Int? = null, &#x3D;: kotlin.String? = null, ne: kotlin.String? = null, lt: kotlin.String? = null, lte: kotlin.String? = null, gt: kotlin.String? = null, gte: kotlin.String? = null, contains: kotlin.String? = null, containss: kotlin.String? = null, &#x60;in&#x60;: kotlin.Array<kotlin.String>? = null, nin: kotlin.Array<kotlin.String>? = null): InlineResponse200 {
        val localVariableQuery: MultiValueMap = mapOf("_limit" to listOf("$limit"), "_sort" to listOf("$sort"), "_start" to listOf("$start"), "&#x3D;" to listOf("$&#x3D;"), "_ne" to listOf("$ne"), "_lt" to listOf("$lt"), "_lte" to listOf("$lte"), "_gt" to listOf("$gt"), "_gte" to listOf("$gte"), "_contains" to listOf("$contains"), "_containss" to listOf("$containss"), "_in" to toMultiValue(&#x60;in&#x60;!!.toList(), "multi"), "_nin" to toMultiValue(nin!!.toList(), "multi"))
        val localVariableConfig = RequestConfig(
                RequestMethod.GET,
                "/file-attachments", query = localVariableQuery
        )
        val response = request<InlineResponse200>(
                localVariableConfig
        )

        return when (response.responseType) {
            ResponseType.Success -> (response as Success<*>).data as InlineResponse200
            ResponseType.Informational -> TODO()
            ResponseType.Redirection -> TODO()
            ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error")
            ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error")
        }
    }
Related issues

https://github.com/strapi/strapi/issues/7219

Swagger-codegen version

Version: 3.0.25

Swagger declaration file content or url
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "DOCUMENTATION",
    "description": "",
    "termsOfService": "YOUR_TERMS_OF_SERVICE_URL",
    "contact": {
      "name": "TEAM",
      "email": "contact-email@something.io",
      "url": "mywebsite.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "x-generation-date": "04/27/2021 9:24:09 AM"
  },
  "x-strapi-config": {
    "path": "/documentation",
    "showGeneratedFiles": true,
    "generateDefaultResponse": true
  },
  "servers": [
    {
      "url": "http://localhost:1337",
      "description": "Development server"
    },
    {
      "url": "YOUR_STAGING_SERVER",
      "description": "Staging server"
    },
    {
      "url": "YOUR_PRODUCTION_SERVER",
      "description": "Production server"
    }
  ],
  "externalDocs": {
    "description": "Find out more",
    "url": "https://strapi.io/documentation/developer-docs/latest/getting-started/introduction.html"
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/file-attachments": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "File-attachment"
        ],
        "parameters": [
          {
            "name": "_limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of results possible",
            "schema": {
              "type": "integer"
            },
            "deprecated": false
          },
          {
            "name": "_sort",
            "in": "query",
            "required": false,
            "description": "Sort according to a specific field.",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_start",
            "in": "query",
            "required": false,
            "description": "Skip a specific number of entries (especially useful for pagination)",
            "schema": {
              "type": "integer"
            },
            "deprecated": false
          },
          {
            "name": "=",
            "in": "query",
            "required": false,
            "description": "Get entries that matches exactly your input",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_ne",
            "in": "query",
            "required": false,
            "description": "Get records that are not equals to something",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_lt",
            "in": "query",
            "required": false,
            "description": "Get record that are lower than a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_lte",
            "in": "query",
            "required": false,
            "description": "Get records that are lower than or equal to a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_gt",
            "in": "query",
            "required": false,
            "description": "Get records that are greater than a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_gte",
            "in": "query",
            "required": false,
            "description": "Get records that are greater than  or equal a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_contains",
            "in": "query",
            "required": false,
            "description": "Get records that contains a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_containss",
            "in": "query",
            "required": false,
            "description": "Get records that contains (case sensitive) a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_in",
            "in": "query",
            "required": false,
            "description": "Get records that matches any value in the array of values",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "deprecated": false
          },
          {
            "name": "_nin",
            "in": "query",
            "required": false,
            "description": "Get records that doesn't match any value in the array of values",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "deprecated": false
          }
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Create a new record",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "File-attachment"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewFile-attachment"
              }
            }
          }
        }
      }
    },
    "/file-attachments/count": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "File-attachment"
        ],
        "parameters": []
      }
    },
    "/file-attachments/{id}": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "File-attachment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update a record",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "File-attachment"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewFile-attachment"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "deprecated": false,
        "description": "Delete a record",
        "responses": {
          "200": {
            "description": "deletes a single record based on the ID supplied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "File-attachment"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/post-authors": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post-author"
        ],
        "parameters": [
          {
            "name": "_limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of results possible",
            "schema": {
              "type": "integer"
            },
            "deprecated": false
          },
          {
            "name": "_sort",
            "in": "query",
            "required": false,
            "description": "Sort according to a specific field.",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_start",
            "in": "query",
            "required": false,
            "description": "Skip a specific number of entries (especially useful for pagination)",
            "schema": {
              "type": "integer"
            },
            "deprecated": false
          },
          {
            "name": "=",
            "in": "query",
            "required": false,
            "description": "Get entries that matches exactly your input",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_ne",
            "in": "query",
            "required": false,
            "description": "Get records that are not equals to something",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_lt",
            "in": "query",
            "required": false,
            "description": "Get record that are lower than a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_lte",
            "in": "query",
            "required": false,
            "description": "Get records that are lower than or equal to a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_gt",
            "in": "query",
            "required": false,
            "description": "Get records that are greater than a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_gte",
            "in": "query",
            "required": false,
            "description": "Get records that are greater than  or equal a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_contains",
            "in": "query",
            "required": false,
            "description": "Get records that contains a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_containss",
            "in": "query",
            "required": false,
            "description": "Get records that contains (case sensitive) a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_in",
            "in": "query",
            "required": false,
            "description": "Get records that matches any value in the array of values",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "deprecated": false
          },
          {
            "name": "_nin",
            "in": "query",
            "required": false,
            "description": "Get records that doesn't match any value in the array of values",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "deprecated": false
          }
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Create a new record",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post-author"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPost-author"
              }
            }
          }
        }
      }
    },
    "/post-authors/count": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post-author"
        ],
        "parameters": []
      }
    },
    "/post-authors/{id}": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post-author"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update a record",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post-author"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPost-author"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "deprecated": false,
        "description": "Delete a record",
        "responses": {
          "200": {
            "description": "deletes a single record based on the ID supplied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post-author"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/posts": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Post"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post"
        ],
        "parameters": [
          {
            "name": "_limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of results possible",
            "schema": {
              "type": "integer"
            },
            "deprecated": false
          },
          {
            "name": "_sort",
            "in": "query",
            "required": false,
            "description": "Sort according to a specific field.",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_start",
            "in": "query",
            "required": false,
            "description": "Skip a specific number of entries (especially useful for pagination)",
            "schema": {
              "type": "integer"
            },
            "deprecated": false
          },
          {
            "name": "=",
            "in": "query",
            "required": false,
            "description": "Get entries that matches exactly your input",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_ne",
            "in": "query",
            "required": false,
            "description": "Get records that are not equals to something",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_lt",
            "in": "query",
            "required": false,
            "description": "Get record that are lower than a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_lte",
            "in": "query",
            "required": false,
            "description": "Get records that are lower than or equal to a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_gt",
            "in": "query",
            "required": false,
            "description": "Get records that are greater than a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_gte",
            "in": "query",
            "required": false,
            "description": "Get records that are greater than  or equal a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_contains",
            "in": "query",
            "required": false,
            "description": "Get records that contains a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_containss",
            "in": "query",
            "required": false,
            "description": "Get records that contains (case sensitive) a value",
            "schema": {
              "type": "string"
            },
            "deprecated": false
          },
          {
            "name": "_in",
            "in": "query",
            "required": false,
            "description": "Get records that matches any value in the array of values",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "deprecated": false
          },
          {
            "name": "_nin",
            "in": "query",
            "required": false,
            "description": "Get records that doesn't match any value in the array of values",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "deprecated": false
          }
        ]
      },
      "post": {
        "deprecated": false,
        "description": "Create a new record",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Post"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPost"
              }
            }
          }
        }
      }
    },
    "/posts/count": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post"
        ],
        "parameters": []
      }
    },
    "/posts/{id}": {
      "get": {
        "deprecated": false,
        "description": "",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Post"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "deprecated": false,
        "description": "Update a record",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Post"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPost"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "deprecated": false,
        "description": "Delete a record",
        "responses": {
          "200": {
            "description": "deletes a single record based on the ID supplied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Post"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/email/": {
      "post": {
        "deprecated": false,
        "description": "Send an email",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Email - Email"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "foo": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/email/test": {
      "post": {
        "deprecated": false,
        "description": "Send an test email",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Email - Email"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "foo": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/email/settings": {
      "get": {
        "deprecated": false,
        "description": "Get the email settings",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Email - Email"
        ],
        "parameters": []
      }
    },
    "/upload/": {
      "post": {
        "deprecated": false,
        "description": "Upload a file",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Upload - File"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "foo": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/upload/files/count": {
      "get": {
        "deprecated": false,
        "description": "Retrieve the total number of uploaded files",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Upload - File"
        ],
        "parameters": []
      }
    },
    "/upload/files": {
      "get": {
        "deprecated": false,
        "description": "Retrieve all file documents",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Upload - File"
        ],
        "parameters": []
      }
    },
    "/upload/files/{id}": {
      "get": {
        "deprecated": false,
        "description": "Retrieve a single file depending on its id",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Upload - File"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "deprecated": false,
        "description": "Delete an uploaded file",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Upload - File"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/upload/search/{id}": {
      "get": {
        "deprecated": false,
        "description": "Search for an uploaded file",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "foo": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "Upload - File"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/users-permissions/roles/{id}": {
      "get": {
        "deprecated": false,
        "description": "Retrieve a role depending on its id",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsersPermissionsRole"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "UsersPermissions - Role"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "deprecated": false,
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/users-permissions/roles": {
      "get": {
        "deprecated": false,
        "description": "Retrieve all role documents",
        "responses": {
          "200": {
            "description": "response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UsersPermissionsRole"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "",
        "tags": [
          "UsersPermissions - Role"
        ],
        "parameters": [
          {
            "name": "_limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of results possible",
            "schema": {
              "type": "integer"
            },
            "deprecated": false
          },
          {
            "name": "_sort",
            "in": "query",
            "required": false,
            "description": "Sort according to a specific field.",
            "schema": {

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the supplied OpenAPI declaration and Swagger-codegen 3.0.25, focusing on Kotlin client generation. Trace how the parameter names and comments containing '=', backticks, and other escaped characters are rendered, then verify that generated Kotlin source contains valid names and syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.