Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elibracha/openapi-diff-ignore
This repository describes an ignore specification, and can be used to integrate with OpenAPI-diff and customize your breaking changes.
https://github.com/elibracha/openapi-diff-ignore
api-first java openapi openapi-diff openapi3
Last synced: about 1 month ago
JSON representation
This repository describes an ignore specification, and can be used to integrate with OpenAPI-diff and customize your breaking changes.
- Host: GitHub
- URL: https://github.com/elibracha/openapi-diff-ignore
- Owner: elibracha
- License: mit
- Created: 2020-02-03T15:53:55.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-25T06:53:18.000Z (over 2 years ago)
- Last Synced: 2024-09-30T09:12:50.223Z (about 2 months ago)
- Topics: api-first, java, openapi, openapi-diff, openapi3
- Language: Java
- Homepage:
- Size: 519 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
OpenAPI-diff-ignore
============
[![Build Status](https://travis-ci.com/elibracha/openapi-diff-ignore.svg?branch=master)](https://travis-ci.com/elibracha/openapi-diff-ignore)
[![codecov](https://codecov.io/gh/elibracha/openapi-diff-ignore/branch/master/graph/badge.svg)](https://codecov.io/gh/elibracha/openapi-diff-ignore)
[![Jion the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-diff-ignore/shared_invite/enQtOTM4MzYxNDAxMTEwLTk0ZDlmYzcwYWVlNWRiNDA4YmI1MDIwYjZlMTk4Mjc5OTI3NjY0Zjg0ZTEyNjA0NzBkOWY3MmNhNjQ2NjgxYjY)Parse a OpenAPI-diff ignore file specifications(1.x).
Can be use to integrate with OpenAPI-diff and customize your breaking changes.If you think you have found a bug, please file an issue in the [Github Issues](https://github.com/elibracha/openapi-diff-ignore/issues).
Ignore Specification
------------------------### Schema
In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.##### Fixed Fields
Field Name | Type | Description
---|:---:|---
extends | `string` | Can be used to inherit a pre defined ignore file functionality. Provides metadata about basic ignore file for your custom API ignore. (Like -> ".default")
version | `string` | **REQUIRED**. This string MUST be the [semantic version number](https://semver.org/spec/v2.0.0.html) of the [Ignore Specification version](#versions) that the OpenAPI ignore document uses. The `version` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI ignore document.
info | `string` | Provides metadata about general info for the API ignore. The metadata MAY be used by tooling as required.
project | `string` | Provides metadata about the Project using the ignore file. The metadata MAY be used by tooling as required.
paths | [Paths Object](#pathsObject) | The available paths and operations for the API that needed to be ignored.Holds the relative paths to the individual endpoints and their operations.
##### Patterned Fields
Field Pattern | Type | Description
---|:---:|---
/{path} | [Path Item Object](#pathItemObject) | A relative path to an individual endpoint. The field name MUST begin with a slash. Wildcard is allowed. When matching URLs. In case of ambiguous matching, it's up to the tooling to decide the execution order.##### Path Wildcard Matching
Assuming the following paths, the concrete definition, `/pets/mine`, will be matched if used:
```
/pets/** # will match and also match all pets endpoints
/** # will match and also will match all endpoints
```
NOTICE! When using wildcards all endpoints matching the wildcard will apply the ignore specified.##### Paths Object Example
```yaml
paths:
/pet/**, /store/**: # this path will match any 'pet' or 'store' endpoint
get:
response:
200:
new: true
parameters:
- username
- passwordpost:
request:
content:
application/json, application/octet-stream: $
response:
200:
new: true
content:
application/json:
schema:
properties:
- petId
- quantity
- shipDate
- complete
security:
petstore_auth:
- 'write:pets'
- 'read:pets'/user/login: # this path will match only '/user/login' endpoint.
post: $
```Describes the operations available on a single path.
A Path Item MAY be empty, due to [ACL constraints](#securityFiltering).
The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.##### Fixed Fields
Field Name | Type | Description
---|:---:|---
get | [Operation Object](#operationObject) | A definition of a GET operation on this path.
put | [Operation Object](#operationObject) | A definition of a PUT operation on this path.
post | [Operation Object](#operationObject) | A definition of a POST operation on this path.
delete | [Operation Object](#operationObject) | A definition of a DELETE operation on this path.
options | [Operation Object](#operationObject) | A definition of a OPTIONS operation on this path.
head | [Operation Object](#operationObject) | A definition of a HEAD operation on this path.
patch | [Operation Object](#operationObject) | A definition of a PATCH operation on this path.
trace | [Operation Object](#operationObject) | A definition of a TRACE operation on this path.##### Path Item Object Example
```yaml
post:
request:
content:
application/json, application/octet-stream: $
response:
200:
new: true
content:
application/json:
schema:
properties:
- petId
- quantity
- shipDate
- complete
security:
petstore_auth:
- 'write:pets'
- 'read:pets'
put: $
delete: $
```Describes a single API ignore operation on a path.
##### Fixed Fields
Field Name | Type | Description
---|:---:|---
security | [Security Object](#parameterObject) | A list of security requirements that are going to be ignored.
parameters | [Parameter Object](#parameterObject)| A list of parameters that are going to be ignored.
request | [Request Object](#requestBodyObject) | The request body applicable for this operation. can specify ignore for content-type.
response | [Response Object](#responsesObject) | The list of possible response statuses that are going to be ignored.##### Operation Object Example
```yaml
request:
content:
application/json, application/octet-stream: $parameters:
- username
- passwordresponse:
200:
new: true
content:
application/json:
schema:
properties:
- petId
- quantity
- shipDate
- completesecurity:
petstore_auth:
- 'write:pets'
- 'read:pets'
```
#### Security ObjectDescribes a security requirements that needed to be ignored.
##### Fixed Fields
Field Name | Type | Description
---|:---:|---
{schema} | Map | A map of security requirements that are going to be ignored.
##### Security Object Example```yaml
security:
petstore_auth:
- 'write:pets'
- 'read:pets'
api_key:
- 'read:users'
```Documentation
-------------More information can be found on [Docs][openapi-diff-ignore-home].
Where can I get the latest release?
-----------------------------------
You can download release source from our release page.Contributing
------------If you are interested in the development of OpenAPI-diff-ignore, please consult the
documentation first and afterwards you are welcome to join the developers
mailing list to ask question or discuss new ideas / features / bugs etc.Take a look into the [contribution guidelines](CONTRIBUTING.md).
Quick Build
-------
If you want to bootstrap openapi-diff-ignore, you'll need:
- Java 1.8+
- Maven 3.x.x or later
- Run Maven, specifying a location into which the completed Maven distro should be installed:
```
./mvnw clean package
```[openapi-diff-ignore-home]: https://maven.apache.org/