Skip to content
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

Add root redirect to /docs/v2 #20

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Conversation

mbklein
Copy link
Contributor

@mbklein mbklein commented Sep 7, 2022

Description

Primary purpose

This PR reconfigures how APIs are mounted within the dcapi... API Gateway Domain:

/ - root API
└── api
    ├── v1 - v1 API
    └── v2 - v2 API

The root API has two routes:

  • /docs/v2 - the v2 documentation
  • / - a tiny function that does nothing but redirect to /docs/v2

Deployment changes

In addition, the following changes simplify the lambda packages created by SAM and prevent redundant deployments:

  • Make src its own NPM project
  • Move runtime dependencies from /package.json to src/package.json
  • Create preinstall script in root that installs src packages
  • Add CodeUri: ./src to all API functions

As a result:

  • Only changes to template.yaml or src/**/* will trigger an update of all the API lambdas on deploy
  • The new root redirect lambda can be deployed on its own without the entire API package coming along for the ride

Documentation changes

  • Add query and as to the GET /search OpenAPI spec
  • Add IiifPresentationManifest as a possible search response type

Testing

This change has already been deployed to staging, so you can test:

Docs

DC API v2

DC API v1

@mbklein mbklein requested review from bmquinn and kdid September 7, 2022 14:19
Prevent redundant code deploys
@mbklein mbklein merged commit b98536f into deploy/staging Sep 7, 2022
@mbklein mbklein deleted the docs-with-redirect branch September 7, 2022 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants