Skip to content

Open API schema type errors #40

@joshpostel

Description

@joshpostel

The website's openapi.json appears to have some incorrect types. For example payment_terms_period has type string in some places, when it appears to be an integer.

    post:
      summary: Create new Account
...
                payment_terms_period:
                  type: string
                  nullable: true
                  description: Payment terms period in days; required if `payment_terms` are included, but can be `null`
                  example: 30
    OrderContact:
  ...
            payment_terms_period:
              type: string
              nullable: true
    Account:
...
        payment_terms_period:
          type: integer
          nullable: true
          example: 30

This leads to deserialization errors in some openapi clients:

config: Configuration { base_path: "https://api.paperlessparts.com", user_agent: Some("OpenAPI-Generator/1.0/rust"), client: Client { accepts: Accepts, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*"} }, basic_auth: None, oauth_access_token: None, bearer_access_token: None, api_key: Some(ApiKey { prefix: Some("API-Token"), key: "xxx" }) }
resp: Err(Serde(Error("invalid type: integer `30`, expected a string", line: 1, column: 621)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions