-
Notifications
You must be signed in to change notification settings - Fork 47
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
Swagger docs page with custom URL #106
Comments
Can you try changing host to host: 'https://${self:custom.apiDomains.${opt:stage, self:provider.stage}}' |
But also, is there a reason you're specifying the host explicitly? It looks like, for your use-case, you're trying to use the same host/domain as the rest of your serverless functions, which is default behavior. Could you try without the |
@bfaulk96 i also face the same issue. |
Also having the same issue. The plugin generates its own host and uses that in the swagger docs, which is misleading! Anyone got a solution for this yet? Leaving out the host does work as well.
|
Hey all, just wanted to let you know that I do not know of a solution for this. I didn't write the original plugin, I just wanted to expand on its initial features a bit so I became a maintainer. I don't have a deep understanding of Serverless so I am quite clueless on how this problem would even be addressed, and unfortunately with my new job, I don't really have as much time to explore this plugin. We're happy to look at contributions from the community, but just being very transparent, Sam (the original plugin creator) and I are both very busy and are unlikely to do much active development on this anymore (I don't even use Serverless at my new job, which means my existing knowledge will continue to shrink as well). |
@auerl @arsene-riaworx |
I had the same problem, and I did that. {
// ...
customDomain: {
domainName: 'api.example.com',
certificateName: 'api.example.com',
// apiType: 'http',
createRoute53Record: true,
createRoute53IPv6Record: true,
autoDomain: true
},
autoswagger: {
title: 'Sls app',
apiType: 'http',
generateSwaggerOnDeploy: false,
swaggerPath: 'swagger',
apiKeyHeaders: ['Authorization'],
useStage: false,
basePath: '/${sls:stage}',
schemes: ['http', 'https'],
excludeStages: ['test', 'prod', 'production'],
useRedirectUI: true
}
// ...
} |
Hi all,
I am trying to generate a swagger docs page for a REST API based on express.js and the serverless framework. In serverless.yml we specified the following serverless-auto-swagger config parameters:
Now when I deploy to stage dev using sls deploy I get the following output:
The swagger docs page is available under https://y5d2vybjm0.execute-api.eu-central-1.amazonaws.com/swagger but not, as I would expect, under https://api-dev.boum.us/swagger
Any idea why that is? What do I need to do to make it available under the custom domain name?
Thanks much in advance!
The text was updated successfully, but these errors were encountered: