Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v6 ogmios parameter #383

Merged
merged 5 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Unreleased changes are in the `master` branch.

## [Unreleased]

### Added

- `version` query param in `/utils/txs/evaluate` and `/utils/txs/evaluate/utxos` endpoint

### Fixed

- IPFS state enum
Expand Down
16 changes: 16 additions & 0 deletions blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5148,6 +5148,14 @@ paths:
type: string
enum:
- application/cbor
- in: query
name: version
required: false
schema:
type: number
default: 5
description: |
Optional parameter to specify the version of the Ogmios service to use. Default is `5`. Set to `6` to use Ogmios version 6.
x-codeSamples:
- lang: Shell
label: cURL
Expand Down Expand Up @@ -5218,6 +5226,14 @@ paths:
type: string
enum:
- application/json
- in: query
name: version
required: false
schema:
type: number
default: 5
description: |
Optional parameter to specify the version of the Ogmios service to use. Default is `5`. Set to `6` to use Ogmios version 6.
requestBody:
description: JSON payload
required: true
Expand Down
18 changes: 18 additions & 0 deletions docs/blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5378,6 +5378,15 @@ paths:
type: string
enum:
- application/cbor
- in: query
name: version
required: false
schema:
type: number
default: 5
description: >
Optional parameter to specify the version of the Ogmios service to
use. Default is `5`. Set to `6` to use Ogmios version 6.
x-codeSamples:
- lang: Shell
label: cURL
Expand Down Expand Up @@ -5456,6 +5465,15 @@ paths:
type: string
enum:
- application/json
- in: query
name: version
required: false
schema:
type: number
default: 5
description: >
Optional parameter to specify the version of the Ogmios service to
use. Default is `5`. Set to `6` to use Ogmios version 6.
requestBody:
description: JSON payload
required: true
Expand Down
2 changes: 1 addition & 1 deletion json-schema.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5378,6 +5378,15 @@ paths:
type: string
enum:
- application/cbor
- in: query
name: version
required: false
schema:
type: number
default: 5
description: >
Optional parameter to specify the version of the Ogmios service to
use. Default is `5`. Set to `6` to use Ogmios version 6.
x-codeSamples:
- lang: Shell
label: cURL
Expand Down Expand Up @@ -5456,6 +5465,15 @@ paths:
type: string
enum:
- application/json
- in: query
name: version
required: false
schema:
type: number
default: 5
description: >
Optional parameter to specify the version of the Ogmios service to
use. Default is `5`. Set to `6` to use Ogmios version 6.
requestBody:
description: JSON payload
required: true
Expand Down
12 changes: 10 additions & 2 deletions src/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5594,7 +5594,11 @@ export interface paths {
*/
post: {
parameters: {
query?: never;
query?: {
/** @description Optional parameter to specify the version of the Ogmios service to use. Default is `5`. Set to `6` to use Ogmios version 6.
* */
version?: number;
};
header: {
"Content-Type": "application/cbor";
};
Expand Down Expand Up @@ -5663,7 +5667,11 @@ export interface paths {
*/
post: {
parameters: {
query?: never;
query?: {
/** @description Optional parameter to specify the version of the Ogmios service to use. Default is `5`. Set to `6` to use Ogmios version 6.
* */
version?: number;
};
header: {
"Content-Type": "application/json";
};
Expand Down
8 changes: 8 additions & 0 deletions src/paths/api/utils/txs/evaluate/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ post:
schema:
type: string
enum: ["application/cbor"]
- in: query
name: version
required: false
schema:
type: number
default: 5
description: |
Optional parameter to specify the version of the Ogmios service to use. Default is `5`. Set to `6` to use Ogmios version 6.
x-codeSamples:
- lang: "Shell"
label: "cURL"
Expand Down
8 changes: 8 additions & 0 deletions src/paths/api/utils/txs/evaluate/utxos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ post:
schema:
type: string
enum: ["application/json"]
- in: query
name: version
required: false
schema:
type: number
default: 5
description: |
Optional parameter to specify the version of the Ogmios service to use. Default is `5`. Set to `6` to use Ogmios version 6.
requestBody:
description: "JSON payload"
required: true
Expand Down
18 changes: 18 additions & 0 deletions test/tests/__snapshots__/get-schema-for-endpoint.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24695,6 +24695,15 @@ relative to the start of the network
},
},
"/utils/txs/evaluate": {
"querystring": {
"properties": {
"version": {
"default": 5,
"type": "number",
},
},
"type": "object",
},
"response": {
"200": {
"additionalProperties": true,
Expand Down Expand Up @@ -24857,6 +24866,15 @@ relative to the start of the network
},
},
"/utils/txs/evaluate/utxos": {
"querystring": {
"properties": {
"version": {
"default": 5,
"type": "number",
},
},
"type": "object",
},
"response": {
"200": {
"additionalProperties": true,
Expand Down
9 changes: 9 additions & 0 deletions test/tests/get-schema-for-endpoint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,15 @@ describe('getSchemaForEndpoint', () => {

test('/utils/txs/evaluate/utxos', () => {
expect(getSchemaForEndpoint('/utils/txs/evaluate/utxos')).toStrictEqual({
"querystring": {
"properties": {
"version": {
"default": 5,
"type": "number",
},
},
"type": "object",
},
response: {
'200': { type: 'object', additionalProperties: true },
'400': {
Expand Down
Loading