Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open API schema type errors #40

Open
joshpostel opened this issue Feb 8, 2023 · 1 comment
Open

Open API schema type errors #40

joshpostel opened this issue Feb 8, 2023 · 1 comment

Comments

@joshpostel
Copy link

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)))

@joshpostel
Copy link
Author

    OrderComponent:
      type: object
      properties:
        id:
          type: string

should also be type integer instead of string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant