intellij-openapi-generator icon indicating copy to clipboard operation
intellij-openapi-generator copied to clipboard

OpenAPI data types are all translated to `Kotlin.Any`.

Open mounty1 opened this issue 1 year ago • 1 comments

E.g., given

openapi: "3.1.0"
info:
  title: Get a user's profile
  version: "1.0"

paths:
  /profile:
    get:
      description: The requested user's profile, if it exist
      responses:
        '200':
          description: profile body
          content:
            application/json:
              schema:
                type: object
                required:
                  - username
                  - description
                  - id
                properties:
                  username:
                    type: string
                  description:
                    type: string
                  gender:
                    type: string
                  id:
                    type: int
[...]

the output is:

data class ProfileGet200Response (

    @Json(name = "username")
    val username: kotlin.Any?,

    @Json(name = "description")
    val description: kotlin.Any?,

    @Json(name = "id")
    val id: kotlin.Any?,

    @Json(name = "gender")
    val gender: kotlin.Any? = null,
[...]

Surely I am missing something?

mounty1 avatar Feb 05 '24 09:02 mounty1

Why has this issue not been replied to?

  • we have other stuff to do than answer questions in issues.
  • this is not a support forum.
  • you obviously have not read the entire user documentation.

mounty1 avatar Feb 08 '24 07:02 mounty1