This repository contains client libraries for the ChRIS backend created using the OpenAPI generator.
| Package | Language | Description |
|---|---|---|
| aiochris-oag | Python | Python client based on asyncio and aiohttp. |
| chris-oag | Python | Python client based on urllib3. |
It would be nice for this to be fully automated, but currently it is not. FNNDSC/ChRIS_ultron_backEnd#587
When a breaking release is made in https://github.com/FNNDSC/ChRIS_ultron_backEnd...
git clone [email protected]:FNNDSC/openapi-clients.git
cd openapi-clients
echo "1.2.3" > version.txt # increase the value of version.txt as appropriate
just # regenerate all client code
git add -A
git commit -m "Version $(< version.txt)"
git push origin mainMany other generators are available. See the list here: https://openapi-generator.tech/docs/generators
To add a generator, create a YAML configuration file for it in configs.
The rust generator is lacking for several reasons:
- Produces
Option<Option<_>>, which is partially fixed by upgrading toopenapi: 3.1.0OpenAPITools/openapi-generator#16283 - Does not support
additionalPropertiesOpenAPITools/openapi-generator#20965 OpenAPITools/openapi-generator#19989 - Bug calling
format!()withOption<T>OpenAPITools/openapi-generator#20145 - Produces non-compiling code OpenAPITools/openapi-generator#19923
- Subjectively, the code produced contains a lot of nonsense
To avoid these problems, we:
- Avoid generating the Rust client, produce serde models only
- Apply manual patches to fix models