Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

import OpenAPI3 description files #220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"files": [
"stats",
"contentinternal",
"esx",
"content",
"vcenter",
"appliance",
"vapi",
"cis"
]
}
15,098 changes: 15,098 additions & 0 deletions vmware_rest_code_generator/api_specifications/7.0.3_openapi3/appliance.json

Large diffs are not rendered by default.

3,555 changes: 3,555 additions & 0 deletions vmware_rest_code_generator/api_specifications/7.0.3_openapi3/cis.json

Large diffs are not rendered by default.

6,535 changes: 6,535 additions & 0 deletions vmware_rest_code_generator/api_specifications/7.0.3_openapi3/content.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

13,383 changes: 13,383 additions & 0 deletions vmware_rest_code_generator/api_specifications/7.0.3_openapi3/esx.json

Large diffs are not rendered by default.

2,518 changes: 2,518 additions & 0 deletions vmware_rest_code_generator/api_specifications/7.0.3_openapi3/stats.json

Large diffs are not rendered by default.

4,143 changes: 4,143 additions & 0 deletions vmware_rest_code_generator/api_specifications/7.0.3_openapi3/vapi.json

Large diffs are not rendered by default.

53,874 changes: 53,874 additions & 0 deletions vmware_rest_code_generator/api_specifications/7.0.3_openapi3/vcenter.json

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions vmware_rest_code_generator/api_specifications/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# How to generate the OpenAPI3 description files

```bash
#!/bin/bash
set -eux
rm -rf ~/tmp/venv-vmware-openapi
python3 -m venv ~/tmp/venv-vmware-openapi
source ~/tmp/venv-vmware-openapi/bin/activate
pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git
git clone https://github.com/vmware/vmware-openapi-generator ~/tmp/vmware-openapi-generator
cd ~/tmp/vmware-openapi-generator
wget https://patch-diff.githubusercontent.com/raw/vmware/vmware-openapi-generator/pull/71.patch
git am 71.patch
rm 71.patch
mkdir -p ~/tmp/openapi/results
python vmsgen.py --insecure -vc vcenter.test -o ~/tmp/openapi/results
```
3 changes: 2 additions & 1 deletion vmware_rest_code_generator/cmd/refresh_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,8 @@ def main():
for json_file in ["vcenter.json", "content.json", "appliance.json"]:
print("Generating modules from {}".format(json_file))
raw_content = pkg_resources.resource_string(
"vmware_rest_code_generator", f"api_specifications/7.0.2/{json_file}"
"vmware_rest_code_generator",
f"api_specifications/7.0.3_openapi3/{json_file}",
)
swagger_file = SwaggerFile(raw_content)
resources = swagger_file.init_resources(swagger_file.paths.values())
Expand Down