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

web-api content type is text. Should be json. #237

Open
CThuleHansen opened this issue May 7, 2021 · 0 comments
Open

web-api content type is text. Should be json. #237

CThuleHansen opened this issue May 7, 2021 · 0 comments
Assignees

Comments

@CThuleHansen
Copy link
Contributor

Ensure proper content-types.
This makes it possible to link swagger docs to the actual java object representing the json.
i.e. with just text, the automated swagger docs cannot say anything about the data:
image

But with json, swagger can:
image

I think it is possible to have multiple content-types, as it works for simulate (https://github.com/INTO-CPS-Association/maestro/blob/development/maestro-webapi/src/main/java/org/intocps/maestro/webapi/maestro2/Maestro2SimulationController.java#L217)

But it requires some plumbing (https://github.com/INTO-CPS-Association/maestro/blob/development/maestro-webapi/src/main/java/org/intocps/maestro/webapi/SimulateRequestBodyConverter.java)

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