We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have an issue with using an example and actual result, that mock server returns. Values are not in the same order.
I am using lastest docker image with environment:
Expected result:
{ "0_0": "0", "1_1": "1", "2_2": "2", "3_3": "3", "4_4": "4", "5_5": "5", "6_6": "6", "7_7": "7", "8_8": "8", "9_9": "9", "10_10": "10", "11_11": "11", "12_12": "12" }
Actual result - values 10_10, 11_11 and 12_12 are not in the expected position.
{ "0_0": "0", "10_10": "10", "11_11": "11", "12_12": "12", "1_1": "1", "2_2": "2", "3_3": "3", "4_4": "4", "5_5": "5", "6_6": "6", "7_7": "7", "8_8": "8", "9_9": "9" }
Openapi file:
{ "openapi": "3.0.3", "info": { "title": "Bug report", "description": "Bug report", "version": "1.0.0" }, "servers": [ { "url": "http://localhost:20002/", "description": "Mockup server", "variables": { "port": { "enum": [ "80" ], "default": "80" } } } ], "paths": { "/bug": { "get": { "description": "Bug report - example values mixed", "responses": { "200": { "description": "Example", "content": { "application/json": { "schema": { "type": "object", "title": "items", "example": { "0_0": "0", "1_1": "1", "2_2": "2", "3_3": "3", "4_4": "4", "5_5": "5", "6_6": "6", "7_7": "7", "8_8": "8", "9_9": "9", "10_10": "10", "11_11": "11", "12_12": "12" } } } } } } } } } }
The text was updated successfully, but these errors were encountered:
Hello! This is because the map in Golang does not preserve the order of the attributes. Is it really needed? As I know JavaScript object does not guarantee the order of the attributes, see https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order.
Sorry, something went wrong.
It's not really needed. I just came across this and I was expecting that response will be "copy & paste" from example without modifications.
No branches or pull requests
I have an issue with using an example and actual result, that mock server returns. Values are not in the same order.
I am using lastest docker image with environment:
Expected result:
Actual result - values 10_10, 11_11 and 12_12 are not in the expected position.
Openapi file:
The text was updated successfully, but these errors were encountered: