Skip to main content

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

cloudmesh.openapi-1.4.24.zip (12.2 kB view details)

Uploaded Source

Built Distribution

cloudmesh.openapi-1.4.24-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cloudmesh.openapi-1.4.24.zip.

File metadata

  • Download URL: cloudmesh.openapi-1.4.24.zip
  • Upload date:
  • Size: 12.2 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

Hashes for cloudmesh.openapi-1.4.24.zip
Algorithm Hash digest
SHA256 c0a530a4c422bd2bf732c33dc708b9bba3167bf921267428ab91f882101bc03d
MD5 f208ba326f2c338dde4dfe3290915a48
BLAKE2b-256 8240c3f8359fe08e9ef898684ac495c163a3eef9be1cd4b4469d3bd6450cc432

See more details on using hashes here.

File details

Details for the file cloudmesh.openapi-1.4.24-py2.py3-none-any.whl.

File metadata

  • Download URL: cloudmesh.openapi-1.4.24-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.8 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

Hashes for cloudmesh.openapi-1.4.24-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c6923c1ecc1800af7f019fb55f08c1cceedc13cfe994457fe4dc7b269e8a4b49
MD5 d1050d1f842459a19c0a37dccf8a25ab
BLAKE2b-256 0f3a926c14c860c86d57e2ea4bbc90af937dfcc01b012245ae9cbc44261ce2d1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page