Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
66 stars 23 forks source link

Deploy to lambda using serveless framework. #96

Closed demeringo closed 2 years ago

demeringo commented 2 years ago

First attempt to implement #95 Packaging and deployment with serverlesss framework works, and API is served from AWS lambda.

There remain a problem with the links in openapi doc that do not include the default stage prefix used when deploying with the serverless framework.

For example: OpenAPI is pointing to this URL (without the dev prefix):

https://1rq5nf92sb.execute-api.eu-west-1.amazonaws.com/v1/server/all_default_models

while content is served from the same URL (but with the dev prefix):

https://1rq5nf92sb.execute-api.eu-west-1.amazonaws.com/**dev**/v1/server/all_default_models

Note: this issue would disappear if using a custom domain (like dev.boa.my-domain.com and prod/boa.my-domain.com).

demeringo commented 2 years ago

I think that we should merge it Ratiaonale is that it can already provide the funtionnality (event if the OpenAPI spec does do fully work yet in serverless mode, which can be addressed later). I registered an issue for this #99.

But would appreciate a quick test from someone else to be sure that this PR has no side effect on the standard API (not serverless).

da-ekchajzer commented 2 years ago

Thank you very much for the PR. I have tested it under the usual conditions works like it should. I am merging it !