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

Format (float,double) for type "number" is not taken into account random value generation #6

Closed
gschafra opened this issue Mar 27, 2019 · 1 comment

Comments

@gschafra
Copy link

Problem:
Given a "number" type without a multipleOf attribute but with format "float" or "double" set (see OAS3 spec https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types) always returns/generates an integer.

Cause:
I suppose it's because the format-attribute is not taken into account in the App\Mock\Generation\Value\Primitive\RandomNumberGenerator and App\Mock\Parameters\Schema\Type\Primitive\NumberType.

Example of a schema:

AnItem:
    value:
          type: number
          format: float
strider2038 added a commit that referenced this issue Mar 29, 2019
#6 bugfix: random float generation improved
@strider2038
Copy link
Collaborator

fixed in v0.1.4

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

2 participants