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

Swagger Definition and Response of the endpoint get /states are not matching #95

Open
jkuenemund opened this issue Jun 10, 2024 · 3 comments

Comments

@jkuenemund
Copy link
Contributor

Describe the bug
The current swagger definition for the endpoint get /states describes the Response as an array of states, with that an example of a response is:

[ { "id": "string", "val": "string", "q": 0, "ts": 0, "lc": 0, "ack": true, "from": "string", "expire": 0, "type": "string", "common": {}, "native": {} } ].

But the real response is more looking like
[ "adapter.0.name.value": { "id": "string", "val": "string", "q": 0, "ts": 0, "lc": 0, "ack": true, "from": "string", "expire": 0, "type": "string", "common": {}, "native": {} } ].
With that the Response is a map (or dictionary) and not a list.

To Reproduce
Steps to reproduce the behavior:
Call the get /states endpoint.

jkuenemund added a commit to jkuenemund/ioBroker.rest-api that referenced this issue Jun 10, 2024
…states is a dictionary a not a list. Change Swagger Response to Dictionary
@Apollon77
Copy link
Contributor

Hey, thank you for reporting. You now created a fork and did your commit and so you can open your branch https://github.com/jkuenemund/ioBroker.rest-api/tree/swagger_yaml_get_states_wrong_response and you should have a "create PR" (or was it called "contribute") and with this you create PullRequest

@jkuenemund
Copy link
Contributor Author

Hi, thanks for your response. I created a PullRequest (#96) hopefully with the correct target branch.

@Apollon77
Copy link
Contributor

yes looks good, perfekt.

GermanBluefox added a commit that referenced this issue Jul 13, 2024
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