-
Notifications
You must be signed in to change notification settings - Fork 330
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
http-api: T6736: move REST API to a node distinct from GraphQL API #4110
Conversation
The GraphQL API was implemented as an addition to the existing REST API. As there is no necessary dependency, separate the initialization of the respective endpoints. Factor out the REST Pydantic models and FastAPI routes for symmetry and clarity.
Avoid duplicate entries in the list of routes when adding/deleting endpoints.
👍 |
✅ No issues found in unused-imports check.. Please refer the workflow run |
The only remaining linting errors are due to an attempt to apply ruff to a now deleted file (since listed as a 'changed' file). Need to use |
Comments as to why the CodeQL scans are now dismissed are under 'Show dismissed'/'Show more details', namely:
|
Linting error fixed with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a feeling that we should avoid mixing formatting changes with logic updates in the future, since PRs can be quite hard to review if they contain a lot of non-functional code changes.
Agreed, however, we need formatting updates in order to pass the linting check: the compromise here was to have all formatting changes is a single commit. Other PR's currently being prepared make the formatting update the initial commit, with logic changes following, which may be easier to read. |
CI integration ❌ failed! Details
|
Change Summary
The REST API was originally implemented under the node ['service', 'https', 'api'], and the GraphQL API implemented as a subnode of that path. Refactor the http-api server into distinct configuration nodes:
['service', 'https', 'api', 'rest']
['service', 'https', 'api', 'graphql']
Structures shared by the apis are simplified; distinct structures are organized more symmetrically.
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Code style update (formatting, renaming)
Refactoring (no functional changes)
--- the one functional change is that the GraphQL API may now be made available independently of the REST API.
Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
Other (please describe):
Related Task(s)
Related PR(s)
vyos/vyos-documentation#1557
Component(s) name
Proposed changes
How to test
Smoketest result
Checklist: