Generate Simplify Framework base projects with True-DevOps code skeleton to run on Cloud with API Gateway, AWS Lambda and other AWS Services from OpenAPI 3.0 specs. The generated code skeleton can be debug locally and can deploy on docker orchestration platform with docker-compose and Kubernetes.
APACHE-2.0 License
This REST API model has moved to npm install simplify-openapi -g
from version 0.1.9.
With new branch of GraphQL Serverless Model at npm install simplify-graphql -g
Initial code based on openapi-codegen
Node.js-based codegen for OpenAPI specs. This project was initially by tailoring from openapi-codegen to use the core code generation functionality to generate the lambda based node projects and AWS CloudFormation stack. There was many tailored code to become a powerful tool nowaday. Thanks to the initial openapi-codegen project that has saved time for developing an initial idea.
Nano
function: per individual method (/path/rc: GET) as a lambda functionMicro
function: per some methods (/path/ac: POST, PUT) as a lambda functionKilo
function: per some resources (/path/rc, /path/ac) as a lambda functionMono
application: as an application running on a docker-compose servicelatest
version as Blue
stage or stable
version as Green
stagelatest
,stable
,enforce
] version on-request by x-canary-selection
HTTP headerdebug
packageexpress
npm install -g simplify-openapi
git clone https://github.com/simplify-framework/openapi.git
cd openapi && npm install && npm link
mkdir pets-project
to create project folder for petscd pets-project && npm link simplify-openapi
if you install from githubsimplify-openapi template -i petsample
to create a petsample
OpenAPI 3.0 specssimplify-openapi template -i othername
to create a othername
OpenAPI 3.0 specssimplify-openapi -i openapi.yaml
to generate code in the current foldersimplify-openapi -i openapi.yaml -o other-folder
to specify another foldercd projectPets && docker-compose up -d
docker-compose down
to stop running!simplify-user
policy-deployment.json
policy-services.json
policy-execute-api.json
aws configure --profile simplify-eu
npm install
to install project dependancies and toolsnpm run stack-deploy
to provision code containers (AWS Lambda empty functions)npm run push-code
to deploy and run code as declared in .env variables (ENV_*)
latest
|stable
|enfoce
|canary
) to setup running modeenforce
mode only)npm run stack-destroy
to provision code containers (AWS Lambda empty functions)info.version
: define software package version, set for initial packagesinfo.title
: define software package description, set for initial packagesx-project-name
: to define a project which contains other resources (e.g pets-micro-services
)x-deployment-name
: to define a deployment environment (e.g pets-demo
, pets-prod
)x-deployment-region
: to define where to deploy resources (e.g eu-west-1
)x-deployment-profile
: to define a profile that hold the deployment access (e.g simplify-eu
)x-api-gateway-name
: to define an API gateway (Rest API) resource (e.g pets-api-gateway
)x-api-authorizer-id
: provide an authorizer id that linked to API Authorizer (e.g Cognito Auhtorizer)x-api-burst-limit
: The API request burst limit, the maximum rate limit over a time ranging from one to a few secondsx-api-rate-limit
: The API request steady-state rate limit.x-api-quota-limit
: The maximum number of requests that can be made in a given time period.x-api-quota-unit
: The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
x-[api/event]-service-runtime
: specify service runtime to create function (e.g nodejs12.x, python3.8 )x-[api/event]-service-lang
: specific runtime language - is one of javascript
or python
x-[api/event]-service-name
: to define lambda functions that host the source code (e.g pets-service
)x-[api/event]-service-model-name
: to redirect the related routing paths into a service group (e.g pets
)x-[api/event]-service-public
: expose or dispose this service path through API gateway (public or not)x-[api/event]-service-authorizer
: enable or disable using API Authorizer (e.g using Cognito Authorizer)x-[api/event]-service-api-key
: enable to use API Key with x-api-key
header to authenticate resourcex-[api/event]-service-key-vault
: enable or disable key vault service (SecretManager in AWS)x-[api/event]-service-schedule
: if set to value (e.g rate(10 minutes)
) will schedule every 10 minsx-[api/event]-service-policy
: external access policy ARN (e.g Policy ARN to DynamoDB, S3, SNS...)x-[api/event]-service-custom
: integrate custom ARN function that trigger for external resource creation/deletionx-[api/event]-service-control
: enable or disable service fallen control using hystrix circuit breaker (valid only for docker)x-[api/event]-service-validation
: validate request parameters using swagger request validator (parseRequest middleware)x-[api/event]-service-passthrough
: passthrough original request from API Gateway to service model for backward compatibilitymethod
: define a HTTP Rest API method: (get/put/post/delete)
x-control-operation-id
or standard operationId
: to define a friendly name for this operation method: e.g getPetByNamex-control-service-timeout
: setup circuit break operation timeout (valid only for docker)x-control-service-duration
: setup circuit break operation close duration (valid only for docker)x-control-service-threshold
: setup circuit break operation threshold (valid only for docker)