Skip to content

Commit

Permalink
Add avocado ci-fix (#8907)
Browse files Browse the repository at this point in the history
* Add avocado ci-fix

* update note

* swagger PR pipeline
  • Loading branch information
ruowan authored Apr 9, 2020
1 parent 4e19db6 commit 27f3aad
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions documentation/ci-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,22 @@ oav validate-spec <swagger-spec-path>
Please see [readme](https://github.com/Azure/oav/blob/master/README.md) for how to install or run tool in details.
Or you can run it in [OpenAPI Hub](https://portal.azure-devex-tools.com/tools/static-validation/static/errors/default)
Refer to [Semantic and Model Violations Reference](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/Semantic-and-Model-Violations-Reference.md) for detailed description of validations and how-to-fix guidance.

## Avocado

Run avocado locally:

```
npm install -g @azure/avocado
avocado
```

When type avocado in command line, avocado will validate in the current directory.

Note: When running in Swagger PR pipeline, Avocado only report errors with file updates in the PR, but ignore the errors existing in base. However when running Avocado against local directory, it reports all errors existing in the files.

- Run all specs: Clone the repo `azure/azure-rest-api-specs` and run "avocado" in folder `azure/azure-rest-api-specs`.
- Run single service specs: create a folder `specification`. and move your service specs folder in `specification`. run "avocado"

Refer to [Avocado Readme](https://github.com/Azure/avocado/blob/master/README.md) for detailed description of validations and how-to-fix guidance.

0 comments on commit 27f3aad

Please sign in to comment.