This project merges multiple OpenAPI specifications extensions into a single core specification for SKG IF.
Project description
ost-skg-if-api-tools
OSTrails - SKG IF - API - tools
How to run
- Clone the repository
docker build -t skgif:test .docker compose up -d- Visit
http://localhost:8000/api/verto see the nginx welcome page. - Visit
http://localhost:8000/api/ver/1.1.3/skg-if-api.yaml?ext=serviceto download the merged yaml file. - (Optional) Visit
http://localhost:8000/api/ver/1.1.3/skg-if-api.yaml?ext=service&nocache=yesto download the merged yaml file with cache disabled.
The stack will be up and running with fastapi on port 8000:8000 and nginx on port 8080:80
Config
The config file is config.toml in the root directory.
[api]
core_folder = "merge/API/core"
#core_fetching_url = "https://github.com/skg-if/api/openapi/ver/{version}/{filename}"
core_fetching_url = "http://nginx/{version}/{filename}"
ext_folder = "merge/API/ext"
output_folder = "merge/API/output"
[api.ext]
ext_postfix = [".yaml", ".yml"]
[cache]
sqlite_file = "cache.db"
core_folderis the folder where the core yaml files are cached.- When cache missing, the core yaml files will be fetched from
core_fetching_urland saved incore_folder. {version}is the version of the core yaml file and{filename}is the filename of the core yaml file.ext_folderis the folder where the ext yaml files are stored.output_folderis the folder where the merged yaml files are saved. It serves as cache for the merged yaml files.ext_postfixis the postfix of the ext yaml filee, the yaml file can be.yamlor.yml.sqlite_fileis the sqlite db where cache information is stored.
Note
For testing purpose, endpoint clear_cache is made to remove all the cache entries in the sqlite db.
The cache is not cleared. Same version of core with same ext will always be fetched from the cache. If
user want to skip the cache and force a new merge, please use nocache=yes to force the cache miss.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ost_skg_if_api_tools-0.1.1.tar.gz.
File metadata
- Download URL: ost_skg_if_api_tools-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaf24fa2aa0827979c005f56aeec659e604a3c0408f93d60256fb128e79f779d
|
|
| MD5 |
ff469250d6b66064fbfe8eee973d4028
|
|
| BLAKE2b-256 |
a0459f85907f89ae6794c8214861f4ab4d8531bd61bb513e5235011a38b4ad91
|
File details
Details for the file ost_skg_if_api_tools-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ost_skg_if_api_tools-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a7dc19e96522de4fee8a3d4fe0d308feb10dd15ad69e489bb10964e341a52b2
|
|
| MD5 |
4d73edc6e33bed64c2dbe730e5027054
|
|
| BLAKE2b-256 |
a4505a3154d7a1e8a7fb7c35f1fb4e2586631e5de3dffb4657e8504ec7429da0
|