A command called openapi and foo for the cloudmesh shell
Project description
Cloudmesh OpenAPI Merge
Prerequisits
$ pip install cloudmesh.openapi
Usage
The manual page for the cms openapi
command is
cms openapi merge [SERVICES...] [--dir=DIR]
cms openapi list [--dir=DIR]
cms openapi description [SERVICES...] [--dir=DIR]
cms openapi md FILE [--indent=INDENT]
You need to have the yaml file in the current directory and execute this program in this directory
An example for yaml files are provided in
Please note that the spec directory is containing openapi specifications that
may not yet completed or are actively worked on. You are invited to participate.
You can download some examples, as well as the .header.yaml
file you will need
with for example curl
Once you have organization.yaml
, user.yaml
timestap.yaml
and .header yaml
in your directory you can say
Please note that this script does not yet rewrite the $ref
appropriately, but if you like to help you can do so.
Example use
Here we demonstrate an example use
First we download some OpenAPI examples:
mkdir example
cd example
$ export SPEC=https://raw.githubusercontent.com/cloudmesh-community/nist/master/spec
$ curl $SPEC/organization.yaml > organization.yaml
$ curl $SPEC/user.yaml > user.yaml
$ curl $SPEC/timestamp.yaml > timestamp.yaml
$ curl $SPEC/.header.yaml > .header.yaml
Now let us look at the descriptions with
$ cms openapi description organization user timestamp
To create a merged specification you can use
$ cms openapi merge organization user timestamp
To create a markdown representation you can use
$ cms openapi md user
Note that for the markdown specification only one service is specified.
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
File details
Details for the file cloudmesh.openapi-1.4.23.zip
.
File metadata
- Download URL: cloudmesh.openapi-1.4.23.zip
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61d2b70d5f16f9be3ecdefb5b1c32fcdafe1630aebacb4879bf0296bf510be3a |
|
MD5 | e3ee889e1f5c532faf5a4d8aff2f7032 |
|
BLAKE2b-256 | d5a3fdcd7ea192ef9993f740522b26c0cb2d723580c4b5f39d7f92e00459fd45 |
File details
Details for the file cloudmesh.openapi-1.4.23-py2.py3-none-any.whl
.
File metadata
- Download URL: cloudmesh.openapi-1.4.23-py2.py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbce404361126065b98533dcd9f7c320ecd1fc71b9ae15f4ee3793ce699e1bac |
|
MD5 | 6d2291876906d9243f9a0a63604d0b25 |
|
BLAKE2b-256 | 3d49763e200b69031625fabc7c4dbe5c34fb58a062827367efa070dc0a373a07 |