Open API Specification Intel Services
In a less fancy way: Oasis is a tool to automate testing of HTTP APIs, which uses Swagger or OAS specification files as source of data.
It reads an API specification file, finds paths, operations, description of data models and security schemes, then uses that data to run requests and validate responses.
When it needs specific data to send with request, such as headers, or path parameters, or POST bodies, it looks for it in the example
field.
npm i
or npm build
or npm watch
npm run oasis \
--reqCT="text/plain" \
--respStatus=201 \
--respCT="application/json" \
You can specify request content type to use and response status & content type to validate the received response against:
npm run oasis \
--spec=specfile.yaml \
--host="DevHost" \
--op="Op Name" \
--reqCT="text/plain" \
--respStatus=201 \
--respCT="application/json" \
Since it's not always possible or reasonable to keep all the data neede for testing in the specification file, Oasis allows you to supply additional parameters and override existing ones:
npm run oasis \
--spec=specfile.yaml \
--host="DevHost" \
--op="Op Name" \
--reqCT="text/plain" \
--respStatus=201 \
--respCT="application/json" \
--override.security.example="0000000XXXXX" \
This will replace the example value, used in request, with a new one.
Extend the --override
functionality.
Scenario files to test complex interactions.
Golang port?