Skip to content

Commit

Permalink
Revert "Upgrade to open-api 3.1.0"
Browse files Browse the repository at this point in the history
This reverts commit 4cf7c0c.
  • Loading branch information
Unisay committed Mar 17, 2023
1 parent 6683d5c commit 79507e4
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions specifications/api/swagger.yaml
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.0.3
info:
title: Cardano Wallet Backend API
version: v2022-12-14
Expand All @@ -25,7 +25,7 @@ servers:
x-date: &date
type: string
format: iso-8601-date-and-time
example: "2019-02-27T14:46:45Z"
example: 2019-02-27T14:46:45Z

x-slotNumber: &slotNumber
type: integer
Expand Down Expand Up @@ -67,17 +67,6 @@ x-epochInfo: &epochInfo
epoch_number: *epochNumber
epoch_start_time: *date

x-nullableEpochInfo: &nullableEpochInfo
type:
- object
- null
required:
- epoch_number
- epoch_start_time
properties:
epoch_number: *epochNumber
epoch_start_time: *date

x-blockId: &blockId
description: The hash of a block
type: string
Expand Down Expand Up @@ -363,6 +352,7 @@ x-assetValueNode: &assetValueNode
- {"asset1": 12, "asset2": 33}

x-valueNode: &valueNode
nullable: false
oneOf:
- <<: *adaQuantity
title: ada coin
Expand Down Expand Up @@ -423,6 +413,7 @@ x-self: &self
- self

x-accountPubkeyOrSelf: &accountPubkeyOrSelf
nullable: false
oneOf:
- <<: *sharedWalletAccountXPubkey
title: public key
Expand Down Expand Up @@ -721,6 +712,7 @@ x-scriptTemplateEntry: &scriptTemplateEntry
template: *ScriptTemplateValue

x-CredentialValue: &CredentialValue
nullable: false
oneOf:
- <<: *credentialPubKey
title: public key
Expand Down Expand Up @@ -1711,10 +1703,9 @@ x-transactionMetadata: &transactionMetadata
# with oneOf we get errors about the 2 schema being both valid
# anyOf seems broken trying to find properties
anyOf:
- type:
- object
- null
- type: object
title: full
nullable: true
additionalProperties:
$ref: "#/components/schemas/TransactionMetadataValue"
example:
Expand All @@ -1723,10 +1714,9 @@ x-transactionMetadata: &transactionMetadata
2: { "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f" }
3: { "list": [ { "int": 14 }, { "int": 42 }, { "string": "1337" } ] }
4: { "map": [{ "k": { "string": "key" }, "v": { "string": "value" }}, { "k": { "int": 14 }, "v": { "int": 42 } }] }
- type:
- object
- null
- type: object
title: simple
nullable: true
additionalProperties:
$ref: "#/components/schemas/TransactionMetadataValueNoSchema"
example:
Expand Down Expand Up @@ -2041,9 +2031,8 @@ x-txScriptValidity: &txScriptValidity
transaction was from an era that doesn't support phase-2 monetary policy
scripts, or is a pending transaction (we don't know if validation passed or
failed until the transaction hits the ledger).
type:
- string
- null
nullable: true
type: string
enum:
- valid
- invalid
Expand All @@ -2066,6 +2055,7 @@ x-rationalAsNumber: &rationalAsNumber
minimum: 0

x-rational: &rational
nullable: false
oneOf:
- <<: *rationalAsNumber
title: rational as number
Expand Down Expand Up @@ -2250,6 +2240,10 @@ components:
ApiNetworkClock: &ApiNetworkClock
<<: *networkInformationNtpStatus

nullableEpochInfo: &nullableEpochInfo
<<: *epochInfo
nullable: True

ApiEraInfo: &ApiEraInfo
type: object
properties:
Expand Down Expand Up @@ -2896,7 +2890,7 @@ components:
status: not_delegating
changes_at:
epoch_number: 14
epoch_start_time: "2020-01-22T10:06:39.037Z"
epoch_start_time: 2020-01-22T10:06:39.037Z

ApiWalletDelegation: &ApiWalletDelegation
description: Delegation settings
Expand Down Expand Up @@ -3321,6 +3315,7 @@ components:

ApiAddressData: &ApiAddressData
type: object
nullable: false
properties:
payment: *ApiCredential
stake:
Expand Down Expand Up @@ -3737,6 +3732,7 @@ components:
type: array
items:
type: object
nullable: true
properties:
k:
$ref: "#/components/schemas/TransactionMetadataValue"
Expand Down

0 comments on commit 79507e4

Please sign in to comment.