-
Notifications
You must be signed in to change notification settings - Fork 59
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
AWS API Gateway compatability #113
Comments
Note that you can remove import Data.Data.Lens (template)
-- | Prepare a Swagger document for AWS.
-- Apparently AWS does not support 'example' property for Swagger Schema.
-- This function removes examples for all schemas.
swaggerForAWS :: Swagger -> Swagger
swaggerForAWS = allSchemas %~ example .~ Nothing
where
allSchemas :: Traversal' Swagger Schema
allSchemas = template It would still be nice to put the warning somewhere in the documentation. Maybe it can be worth to add |
I know this is a bit of an old issue, but I've run into something related. I want to add a sections like this (in yaml format) to each of the
I'm actually generating the whole of the swagger file from a servant API, which I'm deploying to AWS lambda with terraform - having the generated swagger be templated into the terraform set would be awesome. @fizruk @ivan-m - happy to send a PR if necessary or update any documentation if you can point me in the right direction... |
It looks like I'd need to extend the |
FYI: I've just found out from AWS technical support that the reason my generated (from
servant-swagger
) Swagger specification wasn't working was because they don't support theexample
field for objects/models.It might be worth documenting this.
The text was updated successfully, but these errors were encountered: