x789 / xonox

An alternative service for legacy NOXON(tm) devices
GNU Affero General Public License v3.0
6 stars 2 forks source link

Management API does not return JSON #4

Closed lmigula closed 2 years ago

lmigula commented 2 years ago

I'm already trying to create a Web-Frontend. When getting the Data through the API the stations are interpreted as string and need to be converted to JSON.

And the attribute stationUrl isn't consistent. When using a GET Request the stationUrl is returned stream but is expected as streamUrl when creating a new station with a POST request.

x789 commented 2 years ago

Hey @lmigula, thanks for your work on a web-frontend. I am curious to see what you create.

You are right, the API is not consistent and returns stringified JSON objects. 😒 I will fix that with the new release. In the meantime, you can implement against the API I've sketched here.

To test your UI, Stoplight also gives you the option to directly address a mock server.

lmigula commented 2 years ago

Great, I've prepared the App as far as possible and will update the repository later: https://github.com/lmigula/xonox-frontend

If you need a compiled version for testing let me know.

image

x789 commented 2 years ago

@lmigula: I pushed a fix to branch /issue/4. Would you mind to check if this code fixes your issue? If it does, I will publish a new release on PyPI.

lmigula commented 2 years ago

looks good :)