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,11 +93,10 @@ components: ...@@ -93,11 +93,10 @@ components:
type: object type: object
properties: properties:
lastcheques: lastcheques:
oneOf: type: array
- $ref: '#/components/schemas/EmptyNull' nullable: true
- type: array items:
items: $ref: "#/components/schemas/ChequePeerResponse"
$ref: "#/components/schemas/ChequePeerResponse"
ChequePeerResponse: ChequePeerResponse:
type: object type: object
...@@ -139,10 +138,6 @@ components: ...@@ -139,10 +138,6 @@ components:
pattern: "^[A-Fa-f0-9]{40}$" pattern: "^[A-Fa-f0-9]{40}$"
example: "36b7efd913ca4cf880b8eeac5093fa27b0825906" example: "36b7efd913ca4cf880b8eeac5093fa27b0825906"
EmptyNull:
type: 'null'
description: When no entries 'null' is returned instead of empty array.
FileName: FileName:
type: string type: string
...@@ -214,11 +209,10 @@ components: ...@@ -214,11 +209,10 @@ components:
type: object type: object
properties: properties:
tags: tags:
oneOf: type: array
- $ref: '#/components/schemas/EmptyNull' nullable: true
- type: array items:
items: $ref: "#/components/schemas/NewTagResponse"
$ref: "#/components/schemas/NewTagResponse"
P2PUnderlay: P2PUnderlay:
type: string type: string
...@@ -228,11 +222,10 @@ components: ...@@ -228,11 +222,10 @@ components:
type: object type: object
properties: properties:
peers: peers:
oneOf: type: array
- $ref: '#/components/schemas/EmptyNull' nullable: true
- type: array items:
items: $ref: "#/components/schemas/Address"
$ref: "#/components/schemas/Address"
PssRecipient: PssRecipient:
type: string type: string
...@@ -256,9 +249,10 @@ components: ...@@ -256,9 +249,10 @@ components:
type: object type: object
properties: properties:
stamps: stamps:
oneOf: type: array
- $ref: '#/components/schemas/EmptyNull' nullable: true
- $ref: "#/components/schemas/PostageBatches" items:
$ref: "#/components/schemas/PostageBatch"
BatchIDResponse: BatchIDResponse:
type: object type: object
...@@ -294,12 +288,6 @@ components: ...@@ -294,12 +288,6 @@ components:
utilization: utilization:
type: integer type: integer
PostageBatches:
type: array
items:
$ref: "#/components/schemas/PostageBatch"
Settlement: Settlement:
type: object type: object
properties: properties:
...@@ -318,11 +306,10 @@ components: ...@@ -318,11 +306,10 @@ components:
totalSent: totalSent:
type: integer type: integer
settlements: settlements:
oneOf: type: array
- $ref: '#/components/schemas/EmptyNull' nullable: true
- type: array items:
items: $ref: "#/components/schemas/Settlement"
$ref: "#/components/schemas/Settlement"
SwarmAddress: SwarmAddress:
type: string type: string
...@@ -357,11 +344,10 @@ components: ...@@ -357,11 +344,10 @@ components:
type: object type: object
properties: properties:
addresses: addresses:
oneOf: type: array
- $ref: '#/components/schemas/EmptyNull' nullable: true
- type: array items:
items: $ref: "#/components/schemas/SwarmOnlyReference"
$ref: "#/components/schemas/SwarmOnlyReference"
SwarmReference: SwarmReference:
oneOf: oneOf:
......
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