Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make router:get-content-type-for-code() public #6

Closed
ahenket opened this issue Jan 4, 2021 · 1 comment · Fixed by #8
Closed

Make router:get-content-type-for-code() public #6

ahenket opened this issue Jan 4, 2021 · 1 comment · Fixed by #8

Comments

@ahenket
Copy link
Contributor

ahenket commented Jan 4, 2021

In my code I want to know what content-type is requested in the Accept header compared to what I intend to support.

In the oas-router there is a perfectly fine function for it

router:get-content-type-for-code($config as map(*), $code as xs:integer, $fallback as xs:string)

but that function is %private.

Could that function be made public?

@ahenket
Copy link
Contributor Author

ahenket commented Jan 9, 2021

Thanks. As we noted yesterday though: we now need to go through roaster module for everything.

While roaster:accepted-content-types() is there, roaster:get-content-type-for-code() is not. It seems to make sense to add function roaster:get-content-type-for-code() (as reroute to the router function)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant