generated from NASA-PDS/template-repo-java
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
💪 Motivation
...so that I can make the API work without refering to complex documentation or asking for support from ENG node.
📖 Additional Details
⚖️ Acceptance Criteria
Given a version X.Y.Z of the API client
When I perform when I deploy it and use it
Then I expect it to find its server compliant implementation
⚙️ Engineering Details
We want the following repositories:
NOTE: better repository names should be found
- the
pds-api-clientrepository independent from the API version, this should be the framework to publish a client package compliant with a given openapi specification (inpds-apirepository), in a swagger file and push it to pypi automatically (with github action) - the
registry-api-clientrepository is a wrapper of thepds-api-clientin which: - the dependency to the
pds-api-cliemtis given with version number (matching with the spec version) - the url of the reference implementation are hardcoded (or in configuration) so that when used the client directly connects to the proper implementation (unless overriden).
- the wrapper repository code should also check in the API responses that the version is compliant with the server and raise warnings if not.
For api-client:
1 submodule for each application (e.g. registry, doi, ...)
For each submodule (eg products, doi) have:
- Default url
- Default version
Override endpoints object, eg CollectionsApi
With an object with default constructor with no param,
using default url + version host configuration for it's API client
Import collectionApi
Orig_collection_api = collectionApi
Class CollectionApi(Orig_collection_api)
__init__(api_client=None):
If not api_clent:
configuration = Configuration()
configuration.host = 'http://pds-gamma.jpl.nasa.gov/api/' + version
api_client = ApiClient(configuration)
Super().__init__(api_client)
For endpoint in endpoints:
<create all overriden classes>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
ToDo