Use the following command:
./mgc/spec_manipulator/build.sh
Then add the specification:
./mgc/spec_manipulator/specs add https://petstore3.swagger.io/api/v3/openapi.json pet-store
Download the specification:
./mgc/spec_manipulator/specs download
This command downloads the specification and saves it in mgc/spec_manipulator/cli_specs
Validate and indent the specification:
./mgc/spec_manipulator/specs prepare
Convert specifications from version 3.1.x to 3.0.x:
./mgc/spec_manipulator/specs downgrade
This will generate a new specification with the "conv." prefix in the filename.
- Include your specification, paying attention to the version
- If the original specification is v3.1.x, add the converted specification with the "conv." prefix
- Follow the existing pattern:
$BASEDIR/add_specs***.sh NAME_IN_MENU URL_PATH SPEC_LOCAL_PATH UNIQUE_URL
$BASEDIR/add_specs.sh audit audit mgc/spec_manipulator/cli_specs/conv.events-consult.openapi.yaml https://events-consult.jaxyendy.com/openapi-cli.json
$BASEDIR/add_specs_without_region.sh profile profile mgc/spec_manipulator/cli_specs/conv.globaldb.openapi.yaml https://globaldb.jaxyendy.com/openapi-cli.json
Execute the script to finalize specification integration:
./scripts/add_all_specs.sh
After completing the script, two new files will be created in these directories:
openapi-customizations
mgc/sdk/openapi/openapis
Once the process is complete:
- CLI
- Terraform
- Library can be built
- The new API will be available for use
- Ensure you follow the specified naming conventions
- Pay attention to the specification's version and scope (regional or global)
- Use the appropriate script for adding specifications