ardielle / ardielle-tools

Apache License 2.0
18 stars 19 forks source link

honor consumes directive instead of always using application/json #107

Closed havetisyan closed 5 years ago

havetisyan commented 5 years ago

When we have an rdl like:

resource AccessTokenResponse POST "/oauth2/token" { authenticate; AccessTokenRequest request; consumes application/x-www-form-urlencoded exceptions { ResourceError BAD_REQUEST; ResourceError FORBIDDEN; ResourceError NOT_FOUND; ResourceError UNAUTHORIZED; } }

rdl correctly parses and maintains the consumes directive but when generating the client it ignores it and uses application/json always. the PR honors this setting if configured otherwise defaults to json.

psasidhar commented 5 years ago

👍