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

Set body of request/responce #46

Open
rodinv opened this issue Mar 9, 2021 · 1 comment
Open

Set body of request/responce #46

rodinv opened this issue Mar 9, 2021 · 1 comment

Comments

@rodinv
Copy link

rodinv commented Mar 9, 2021

for marshalling/unmarshalling my service input/output data i use github.com/google/jsonapi ( https://jsonapi.org/ ).
Is there a way to use []Byte(or a string with json data) in methods:
AddResponse (parameter 'schema')
AddParamBody( parameter 'p')
?

@elvinchan
Copy link
Collaborator

No, because JSON has no sufficient type information corresponding to OpenAPI 2.0 data type.
For example, for JSON {"a": 1}, you don't know is it int32, int64, float, or double.

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