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

Fix float values #693

Merged
merged 1 commit into from
Jun 30, 2023
Merged

Fix float values #693

merged 1 commit into from
Jun 30, 2023

Conversation

diegotibi
Copy link
Contributor

Adds step="any" to input type when type is number to prevent a bug that occurs when number is used for non integer values.

Example:
Let's have an API that support Latitude and Longitude as input values
/*
* @QueryParam lat number Latitudine. Example: 45.3267105
* @QueryParam lng number Longitudine. Example: 7.995482
*/
The generated documentation example will have a field that look like this:

<input type="number" style="display: block;" name="lat" data-endpoint="GETapi-v2-carrier-eolo-secondary-check" value="45.3267105" data-component="query">

As per validation rules the browser won't let you indroduce any value that isn't an integer number, so if you need to enter a precise value for testing it will be impossible.
Adding 'step="any"' makes possible to input any numeric value, integer or float.

Adds step="any" to input type when type is number to prevent a bug that occurs when number is used for non integer values.
@shalvah shalvah merged commit 84bde95 into knuckleswtf:master Jun 30, 2023
@diegotibi diegotibi deleted the patch-1 branch July 2, 2023 22:48
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

Successfully merging this pull request may close these issues.

2 participants