Commit 0903f2c3 authored by Peter Mrekaj's avatar Peter Mrekaj Committed by GitHub

refactor(openapi): replace user-defined null array type with nullable (#1752)

Replaces user-defined type EmptyNull with the
nullable defined by the OpenAPI specification.
parent e66df071
......@@ -93,9 +93,8 @@ components:
type: object
properties:
lastcheques:
oneOf:
- $ref: '#/components/schemas/EmptyNull'
- type: array
type: array
nullable: true
items:
$ref: "#/components/schemas/ChequePeerResponse"
......@@ -139,10 +138,6 @@ components:
pattern: "^[A-Fa-f0-9]{40}$"
example: "36b7efd913ca4cf880b8eeac5093fa27b0825906"
EmptyNull:
type: 'null'
description: When no entries 'null' is returned instead of empty array.
FileName:
type: string
......@@ -214,9 +209,8 @@ components:
type: object
properties:
tags:
oneOf:
- $ref: '#/components/schemas/EmptyNull'
- type: array
type: array
nullable: true
items:
$ref: "#/components/schemas/NewTagResponse"
......@@ -228,9 +222,8 @@ components:
type: object
properties:
peers:
oneOf:
- $ref: '#/components/schemas/EmptyNull'
- type: array
type: array
nullable: true
items:
$ref: "#/components/schemas/Address"
......@@ -256,9 +249,10 @@ components:
type: object
properties:
stamps:
oneOf:
- $ref: '#/components/schemas/EmptyNull'
- $ref: "#/components/schemas/PostageBatches"
type: array
nullable: true
items:
$ref: "#/components/schemas/PostageBatch"
BatchIDResponse:
type: object
......@@ -294,12 +288,6 @@ components:
utilization:
type: integer
PostageBatches:
type: array
items:
$ref: "#/components/schemas/PostageBatch"
Settlement:
type: object
properties:
......@@ -318,9 +306,8 @@ components:
totalSent:
type: integer
settlements:
oneOf:
- $ref: '#/components/schemas/EmptyNull'
- type: array
type: array
nullable: true
items:
$ref: "#/components/schemas/Settlement"
......@@ -357,9 +344,8 @@ components:
type: object
properties:
addresses:
oneOf:
- $ref: '#/components/schemas/EmptyNull'
- type: array
type: array
nullable: true
items:
$ref: "#/components/schemas/SwarmOnlyReference"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment