Skip to content

Commit d9d0750

Browse files
committed
DMP-5276-OpenapiValidator
Added open apid validation
1 parent ef38fe1 commit d9d0750

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,25 @@ This repository uses spectral to validate OpenAPI specifications. To install spe
399399
400400
https://docs.stoplight.io/docs/spectral/b8391e051b7d8-installation
401401
402-
To validate the OpenAPI specification:
402+
To validate the OpenAPI specification using spectral, run the following command from the root of the repository:
403403
404404
```bash
405405
spectral lint --verbose "src/main/resources/openapi/**/*.{yml,yaml}"
406406
```
407407
408408
Documentation: https://stoplight.io/open-source/spectral
409409
410+
## OpenAPI Validation
411+
412+
The application uses OpenAPI validation to ensure that incoming requests and outgoing responses conform to the OpenAPI specification.
413+
To enable OpenAPI validation, the following properties are set in the application configuration:
414+
415+
```bash
416+
lint-openapi -c lint-openapi-config.yaml "src/main/resources/openapi/**/*.yaml"
417+
```
418+
419+
For more information on OpenAPI validation with IBM openapi validator, see the [openapi validator](https://github.com/IBM/openapi-validator).
420+
410421
Validate the data payload JSON Schemas:
411422
412423
### Supported labels

lint-openapi-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
errorsOnly: false
2+
limits:
3+
warnings: 100
4+
outputFormat: 'json'
5+
summaryOnly: true

0 commit comments

Comments
 (0)