Skip to content

SIDN/ietf-rpp-api

Repository files navigation

RESTful Provisioning Protocol (RPP) API

Schema dependencies

Use the openapi_merged.yaml generated by epp-xsd-to-json-schema for generating server and client code.

Install OpenAPI Generator

brew install openapi-generator

see: https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#15---homebrew

Modify controller template

Template will include header params in the generated Python code.

spec-first/connexion#788 (comment)

generate code

Config

export API_GEN_OUTPUT_DIR=/tmp/rpp
export API_GEN_MODULE_NAME=rpp_py_flask_server

Generate server

Python Flask server stub

openapi-generator generate -g python-flask -i openapi_merged.yaml  -t ./templates/mustache/server/python-flask -o $API_GEN_OUTPUT_DIR \
   --additional-properties packageName=$API_GEN_MODULE_NAME

Start server

cd $API_GEN_OUTPUT_DIR
pip3 install -r requirements.txt
python3 -m $API_GEN_MODULE_NAME

API URL

Browse to: http://localhost:8080/rpp/v1/ui/

Generate client

Python client

openapi-generator generate -g python -i openapi_merged.yaml -o $API_GEN_OUTPUT_DIR

About

RESTful Provisioning Protocol API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages