OpenAPI compliance: avoid $ref siblings (#1457)
This strives to fix all remaining cases where additional attributes (most often 'description' but not only) are provided next to $ref by wrapping $ref in allOf; and also drops allOf in a couple of places where $ref is the only element under it.
This commit is contained in:
parent
10844fef8c
commit
9ebcf5f257
14 changed files with 44 additions and 38 deletions
|
@ -11,23 +11,24 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
$ref: error.yaml
|
||||
type: object
|
||||
title: RateLimitError
|
||||
description: The rate limit was reached for this request
|
||||
properties:
|
||||
errcode:
|
||||
type: string
|
||||
description: The M_LIMIT_EXCEEDED error code
|
||||
example: M_LIMIT_EXCEEDED
|
||||
error:
|
||||
type: string
|
||||
description: A human-readable error message.
|
||||
example: Too many requests
|
||||
retry_after_ms:
|
||||
type: integer
|
||||
description: |-
|
||||
The amount of time in milliseconds the client should wait
|
||||
before trying the request again.
|
||||
example: 2000
|
||||
required: ["errcode"]
|
||||
allOf:
|
||||
- $ref: error.yaml
|
||||
- type: object
|
||||
title: RateLimitError
|
||||
description: The rate limit was reached for this request
|
||||
properties:
|
||||
errcode:
|
||||
type: string
|
||||
description: The M_LIMIT_EXCEEDED error code
|
||||
example: M_LIMIT_EXCEEDED
|
||||
error:
|
||||
type: string
|
||||
description: A human-readable error message.
|
||||
example: Too many requests
|
||||
retry_after_ms:
|
||||
type: integer
|
||||
description: |-
|
||||
The amount of time in milliseconds the client should wait
|
||||
before trying the request again.
|
||||
example: 2000
|
||||
required: ["errcode"]
|
||||
|
|
|
@ -16,9 +16,7 @@ properties:
|
|||
events:
|
||||
description: List of events.
|
||||
items:
|
||||
allOf:
|
||||
- $ref: ../../../event-schemas/schema/core-event-schema/event.yaml
|
||||
type: object
|
||||
$ref: ../../../event-schemas/schema/core-event-schema/event.yaml
|
||||
type: array
|
||||
type: object
|
||||
title: EventBatch
|
||||
|
|
|
@ -38,8 +38,7 @@ properties:
|
|||
conditions:
|
||||
type: array
|
||||
items:
|
||||
allOf:
|
||||
- $ref: push_condition.yaml
|
||||
$ref: push_condition.yaml
|
||||
description: |-
|
||||
The conditions that must hold true for an event in order for a rule to be
|
||||
applied to an event. A rule with no conditions always matches. Only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue