- Edit the corresponding OpenAPI specification file to update the SPI.
Example: Modify a parameter in thetax-estimate
endpoint located inspec/spi/open_tax.yml
.
- Append the new SPI endpoint to the relevant OpenAPI specification file.
Example: Add a new endpointcheck/taxability
inspec/spi/open_tax.yml
.
- Create a new OpenAPI specification file named
openapi_<capability_name>.yml
inside thespec/spi/
directory.
Example:spec/spi/openapi_tax.yml
. - Update the spec.config file to include the new file configuration.
-
Use the following command to validate a specific OpenAPI specification
sh gradlew validateSpec_tax --warning-mode all --stacktrace
-
Use the following command to validate all the OpenAPI specs:
sh gradlew validateSpec --warning-mode all --stacktrace
-
Each OpenAPI specification file in the spec/spi directory may reference other specification files (e.g., credentials.yml). To generate a single bundled OpenAPI specification, use the following commands:
- for a specific openAPI spec:
sh gradlew generateSpec_tax --warning-mode all --stacktrace
- for all openAPI specs:
sh gradlew generateSpec --warning-mode all --stacktrace
-
The generated output will include:
- Java Models
- Clients
- Markdown files
-
These files will be located in the
generated/<capability_name>
folder. Example:generated/tax
- To build the SPI jar for Java, use the following command:
sh gradlew build
- The generated SPI jar will be located in the
./build/libs/
directory.
- Refer to the Updating & Using Postman Collection section to follow the steps to update the Postman collection.