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

Unknown format "float" is used in schema #2939

Open
danielkocot opened this issue Mar 2, 2022 · 4 comments
Open

Unknown format "float" is used in schema #2939

danielkocot opened this issue Mar 2, 2022 · 4 comments
Labels
bug dependencies Pull requests that update a dependency file product/newman

Comments

@danielkocot
Copy link

danielkocot commented Mar 2, 2022

It seems that the "float" format of the number data type leads to an invalid schema test within Newman. The API description is based on OpenAPI 3..0.

  1. Newman Version (can be found via newman -v): 5.3.1
  2. OS details (type, version, and architecture): MacOS, Windows, Linux
  3. Are you using Newman as a library, or via the CLI? CLI
  4. Did you encounter this recently, or has this bug always been there:
  5. Expected behaviour: Valid Schema because other Validators result into a valid schema
@Siegbaert
Copy link

+1
I observed the same issue on version 5.3.2.

@Siegbaert
Copy link

Siegbaert commented Mar 15, 2022

A temporary workaround I found, is to re-define the test case in the Postman-Collection like this:

pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\"]}

It seems like somewhere in the chain an outdated version of ajv (https://github.com/ajv-validator/ajv) is used, which is not capable of handling formats like: float, int32, int64, ... .

@danielkocot
Copy link
Author

Solved with apideck-libraries/portman#281

@malvikach malvikach added the dependencies Pull requests that update a dependency file label Dec 14, 2022
@dparadisZentelia
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file product/newman
Projects
None yet
Development

No branches or pull requests

5 participants