feat(agora): migrate Agora to spec-first development workflow #2767
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2764
Description
This PR updates the Agora product in the monorepo to adopt specification-first development workflow. From now on, the API client for Angular will be automatically generated with OpenAPI Generator. Same goes for the API docs site using Redocly. A reverse proxy (Caddy) is added to the stack to redirect the traffic to different components (web app, REST API, and docs site).
Cc: @sagely1, @JessterB, @jay-hodgson
Changelogs
agora-api-client-angular
usingmodel-ad-api-client-angular
as a templateagora-api-docs
agora-server
toagora-api
/api
by/v1
inagora-api
agora-apex
(reverse proxy)Preview
API Client for Angular
Let's assume that the API specification of Agora has been updated and build:
We can now update the API client for Angular with OpenAPI Generator:
That's it! The API client for Angular is ready to be imported in a web app project developed in the monorepo.
REST API service
Send a request directly to the API service:
Send the request via the reverse proxy (the "apex" component):
Web App
Navigate to
localhost:8000
and you will be redirected to the only page of the app.Note that the page includes data from the REST API.