From d5c159ff4d523fe7795e90b8f53b889ecfa34b41 Mon Sep 17 00:00:00 2001 From: Justin Reynolds Date: Mon, 14 Oct 2024 12:03:58 -0400 Subject: [PATCH] feat: asyncapi fixes --- .github/workflows/publish-packages.yml | 35 + README.md | 8 +- async_api/README.md | 21 + async_api/package.json | 19 + .../requests/account_channels_async_api.yaml | 4 +- .../requests/account_info_async_api.yaml | 3 + .../requests/account_lines_async_api.yaml | 1 + .../requests/ledger_entry_async_api.yaml | 3 + async_api/requests/submit_async_api.yaml | 41 +- async_api/websocket_api.yaml | 18 + docs/contributing/README.md | 24 +- docs/contributing/async-api-id-definition.md | 103 +++ generate-specs.js | 23 - open_api/README.md | 21 + open_api/package.json | 19 + package-lock.json | 624 ++++++++++++++++-- package.json | 10 +- shared/base.yaml | 2 + shared/requests/account_info.yaml | 16 +- shared/requests/account_lines.yaml | 9 +- shared/requests/ledger_entry.yaml | 20 + shared/requests/submit.yaml | 53 +- shared/transactions/payment.yaml | 4 +- 23 files changed, 935 insertions(+), 146 deletions(-) create mode 100644 .github/workflows/publish-packages.yml create mode 100644 async_api/README.md create mode 100644 async_api/package.json create mode 100644 docs/contributing/async-api-id-definition.md delete mode 100644 generate-specs.js create mode 100644 open_api/README.md create mode 100644 open_api/package.json diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 0000000..82acdc9 --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -0,0 +1,35 @@ +name: Publish NPM Packages + +on: + workflow_dispatch: # Only allow manual trigger + +jobs: + publish: + runs-on: ubuntu-latest + + strategy: + matrix: + package-dir: ['dist/asyncapi', 'dist/openapi'] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies for the sub-package + working-directory: ${{ matrix.package-dir }} + run: npm ci + + - name: Publish Sub-package to NPM + working-directory: ${{ matrix.package-dir }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + npm publish --access public + + - name: Clear npm cache + run: npm cache clean --force diff --git a/README.md b/README.md index e0d2de1..35df7fd 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ The aim of this project is the creation of OpenAPI (for JSON-RPC) and AsyncAPI ( ## Directory Structure -``` +```bash ./ ├── README.md ├── addRequestTemplate.js @@ -185,14 +185,12 @@ Semantic Versioning (Semver) is a versioning system that helps to avoid dependen ## Code Generation -<<<<<<< HEAD - The code generator will live outside of all projects (clio , rippled, JavaScript, python, etc…). It can be written in C++, Go, a LISP language, or other languages supporting easy manipulation of Abstract Syntax Trees. -======= + 1. `required` is specified at the bottom of request / response schemas by listing required fields - NOT specified in every individual field. (This makes it easier to at-a-glance see if the list of required fields are all there / what they are, but makes it slightly harder to read individual fields and know if they’re required or not). 2. In order to specify the request / response type for JSON RPC, we need to use a generic path (`/`) and a [`discriminator`](https://redocly.com/docs/resources/discriminator/) which allows us to derive the “type” of an object from the value in a specific parameter in the request. (In the case of the JSON RPC API, the `method` field tells us the type of request, which corresponds exactly with 1 or 2 response types) - - The one case where this isn’t enough information is when a request has a `binary` option - in which case there are 2 possible response structures. + - The one case where this isn’t enough information is when a request has a `binary` option - in which case there are 2 possible response structures. 3. Error responses in the "path" section represent HTTP response / errors. `rippled` or `clio` errors are treated as valid responses, and should be documented as `oneOf` the possible representations for each individual request response. Although rippled errors share a similar shape, ultimately we want to be very clear on what the specific error codes that are possible from each request. ->>>>>>> d950159 (docs updates) - Provide flexibility for project specific behaviors while focusing on core data types and methods. diff --git a/async_api/README.md b/async_api/README.md new file mode 100644 index 0000000..959d787 --- /dev/null +++ b/async_api/README.md @@ -0,0 +1,21 @@ +# XRPL AsyncAPI Specification + +This package provides the AsyncAPI specification for the XRP Ledger ([XRPL](https://xrpl.org)) WebSockets API. + +## Installation + +Install the package via npm: + +```bash +npm install @xrpl/rippled-asyncapi-spec +``` + +## Usage + +Once installed, import the AsyncAPI specification file directly from the package: + +```javascript +import xrplSpec from '@xrpl/rippled-asyncapi-spec/asyncapi.json' +``` + +You can then use the specification with tools like Postman, or AsyncAPI clients to [generate client libraries](https://github.com/ripple/openapi-codegen-xrpl). diff --git a/async_api/package.json b/async_api/package.json new file mode 100644 index 0000000..da3642b --- /dev/null +++ b/async_api/package.json @@ -0,0 +1,19 @@ +{ + "name": "@xrpl/rippled-asyncapi-spec", + "version": "1.0.0", + "description": "AsyncAPI Specification for the XRPL rippled API", + "author": "Ripple", + "repository": { + "type": "git", + "url": "https://github.com/ripple/rippled-api-spec.git" + }, + "keywords": [ + "asyncapi", + "asyncapi-spec", + "xrpl", + "rippled" + ], + "license": "MIT", + "main": "asyncapi.json", + "sideEffects": false +} diff --git a/async_api/requests/account_channels_async_api.yaml b/async_api/requests/account_channels_async_api.yaml index f853e2d..04a9273 100644 --- a/async_api/requests/account_channels_async_api.yaml +++ b/async_api/requests/account_channels_async_api.yaml @@ -12,8 +12,8 @@ components: - $ref: '../../shared/requests/account_channels.yaml#/components/schemas/AccountChannelsRequest' properties: command: + description: The account_channels method returns information about an account's Payment Channels. This includes only channels where the specified account is the channel's source, not the destination. (A channel's "source" and "owner" are the same.) All information retrieved is relative to a particular version of the ledger. Returns an {@link AccountChannelsResponse}. $ref: '../../shared/base.yaml#/components/schemas/CommandTypes' - constant: account_channels id: # Not specifying a type is how we express "any" value is acceptable description: 'A unique identifier for the request.' @@ -82,9 +82,11 @@ components: properties: result: type: object + $id: AccountChannelsSuccessResult allOf: - $ref: '../../shared/requests/account_channels.yaml#/components/schemas/AccountChannelsSuccessResponse' status: type: string + $id: AccountChannelsStatusSuccess enum: - success diff --git a/async_api/requests/account_info_async_api.yaml b/async_api/requests/account_info_async_api.yaml index 33f3bba..5c148cb 100644 --- a/async_api/requests/account_info_async_api.yaml +++ b/async_api/requests/account_info_async_api.yaml @@ -12,6 +12,7 @@ components: - type: object properties: command: + description: The `account_info` command retrieves information about an account, its activity, and its XRP balance. All information retrieved is relative to a particular version of the ledger. Returns an {@link AccountInfoResponseV1}. $ref: '../../shared/base.yaml#/components/schemas/CommandTypes' id: # Not specifying a type is how we express "any" value is acceptable @@ -153,10 +154,12 @@ components: $id: AccountInfoSuccessResponseV1 properties: result: + $id: AccountInfoSuccessV1Result type: object allOf: - $ref: '../../shared/requests/account_info.yaml#/components/schemas/AccountInfoSuccessResponseV1' status: + $id: AccountInfoSuccessV1Success type: string enum: - success diff --git a/async_api/requests/account_lines_async_api.yaml b/async_api/requests/account_lines_async_api.yaml index 24da58c..e20256c 100644 --- a/async_api/requests/account_lines_async_api.yaml +++ b/async_api/requests/account_lines_async_api.yaml @@ -11,6 +11,7 @@ components: - type: object properties: command: + description: The account_lines method returns information about an account's trust lines, including balances in all non-XRP currencies and assets. All information retrieved is relative to a particular version of the ledger. Expects an {@link AccountLinesResponse}. $ref: '../../shared/base.yaml#/components/schemas/CommandTypes' id: # Not specifying a type is how we express "any" value is acceptable diff --git a/async_api/requests/ledger_entry_async_api.yaml b/async_api/requests/ledger_entry_async_api.yaml index 2555cc6..5f413d8 100644 --- a/async_api/requests/ledger_entry_async_api.yaml +++ b/async_api/requests/ledger_entry_async_api.yaml @@ -12,6 +12,7 @@ components: - type: object properties: command: + description: The `ledger_entry` method returns a single ledger object from the XRP Ledger in its raw format. Expects a response in the form of a {@link LedgerEntryResponse}. $ref: '../../shared/base.yaml#/components/schemas/CommandTypes' id: description: 'A unique identifier for the request.' @@ -73,11 +74,13 @@ components: $id: LedgerEntrySuccessResponse properties: result: + $id: LedgerEntrySuccessResponseResult type: object allOf: - $ref: '../../shared/requests/ledger_entry.yaml#/components/schemas/LedgerEntrySuccessResponse' status: type: string + $id: LedgerEntryStatusSuccess enum: - success required: diff --git a/async_api/requests/submit_async_api.yaml b/async_api/requests/submit_async_api.yaml index a02d84d..8b96098 100644 --- a/async_api/requests/submit_async_api.yaml +++ b/async_api/requests/submit_async_api.yaml @@ -11,18 +11,17 @@ components: - Submit-only mode takes a signed, serialized transaction as a binary blob, and submits it to the network as-is. Since signed transaction objects are immutable, no part of the transaction can be modified or automatically filled in after submission. - Sign-and-submit mode takes a JSON-formatted Transaction object, completes and signs the transaction in the same manner as the sign method, and then submits the signed transaction. We recommend only using this mode for testing and development. To send a transaction as robustly as possible, you should construct and sign it in advance, persist it somewhere that you can access even after a power outage, then submit it as a tx_blob. After submission, monitor the network with the tx method command to see if the transaction was successfully applied; if a restart or other problem occurs, you can safely re-submit the tx_blob transaction: it won't be applied twice since it has the same sequence number as the old transaction. - properties: - allOf: - - $ref: '../../shared/requests/submit.yaml#/components/schemas/SubmitRequest' - properties: - command: - $ref: '../../shared/base.yaml#/components/schemas/CommandTypes' - id: - # Not specifying a type is how we express "any" value is acceptable - description: 'A unique identifier for the request.' - required: - - command - - id + allOf: + - $ref: '../../shared/requests/submit.yaml#/components/schemas/SubmitRequestV1' + - type: object + properties: + command: + $ref: '../../shared/base.yaml#/components/schemas/CommandTypes' + id: + description: 'A unique identifier for the request.' + required: + - command + - id example: id: 2 command: submit @@ -34,14 +33,10 @@ components: properties: result: type: object - discriminator: - propertyName: status - mapping: - success: '../../shared/requests/submit.yaml#/components/schemas/SubmitSuccessResponseV1' - error: '../../shared/requests/account_info.yaml#/components/schemas/SubmitErrorResponse' + discriminator: status oneOf: - - $ref: '../../shared/requests/account_info.yaml#/components/schemas/SubmitSuccessResponseV1' - - $ref: '../../shared/requests/account_info.yaml#/components/schemas/SubmitErrorResponse' + - $ref: '../../shared/requests/submit.yaml#/components/schemas/SubmitSuccessResponseV1' + - $ref: '../../shared/requests/submit.yaml#/components/schemas/SubmitErrorResponse' # TODO: Decide if it's worth having these fields (id and type) here or better to just include them in both the BaseSuccess and BaseError objects for maintainability / readability. id: # Not specifying a type is how we express "any" value is acceptable @@ -93,13 +88,9 @@ components: properties: result: type: object - discriminator: - propertyName: status - mapping: - success: '../../shared/requests/submit.yaml#/components/schemas/SubmitSuccessResponseV2' - error: '#/components/schemas/SubmitErrorResponse' + discriminator: status oneOf: - - $ref: '../../shared/requests/account_info.yaml#/components/schemas/SubmitSuccessResponseV2' + - $ref: '../../shared/requests/submit.yaml#/components/schemas/SubmitSuccessResponseV2' - $ref: '#/components/schemas/SubmitErrorResponse' # TODO: Decide if it's worth having these fields (id and type) here or better to just include them in both the BaseSuccess and BaseError objects for maintainability / readability. id: diff --git a/async_api/websocket_api.yaml b/async_api/websocket_api.yaml index d67d7ff..8d20ebf 100644 --- a/async_api/websocket_api.yaml +++ b/async_api/websocket_api.yaml @@ -55,6 +55,7 @@ channels: - $ref: '#/components/messages/AccountInfoRequest' - $ref: '#/components/messages/AccountLinesRequest' - $ref: '#/components/messages/LedgerEntryRequest' + - $ref: '#/components/messages/SubmitRequest' # ... (Add references for additional requests) publish: operationId: publishToRoot @@ -64,6 +65,7 @@ channels: - $ref: '#/components/messages/AccountInfoResponseV1' - $ref: '#/components/messages/AccountLinesResponse' - $ref: '#/components/messages/LedgerEntryResponse' + - $ref: '#/components/messages/SubmitResponse' # ... (Add references for additional responses) # Moved message definitions to a separate components section @@ -101,6 +103,14 @@ components: payload: $ref: './requests/ledger_entry_async_api.yaml#/components/schemas/LedgerEntryRequest' + # Submit request message + SubmitRequest: + name: SubmitRequest + messageId: SubmitRequest + contentType: application/json + payload: + $ref: './requests/submit_async_api.yaml#/components/schemas/SubmitRequest' + # ... (Add definitions for additional message types) # Account channels response message @@ -134,4 +144,12 @@ components: contentType: application/json payload: $ref: './requests/ledger_entry_async_api.yaml#/components/schemas/LedgerEntryResponse' + + # Submit response message + SubmitResponse: + name: SubmitResponse + messageId: SubmitResponse + contentType: application/json + payload: + $ref: './requests/submit_async_api.yaml#/components/schemas/SubmitResponseV1' # ... (Add definitions for additional response types) diff --git a/docs/contributing/README.md b/docs/contributing/README.md index af1e49c..a27cb63 100644 --- a/docs/contributing/README.md +++ b/docs/contributing/README.md @@ -2,23 +2,23 @@ We currently use Redocly's tooling to test that our api is following the specification. We also use it to verify that we can generate, submit, and receive responses that match our api description with Redocly's "Try It" feature that let's you send requests directly from the auto-generated docs. -1. Install `redocly cli` - https://redocly.com/docs/cli/installation/ -2. Run `redocly lint json_api.yaml` (Docs on their lint command: https://redocly.com/docs/cli/commands/lint/) +1. Install `redocly cli` - [https://redocly.com/docs/cli/installation/](https://redocly.com/docs/cli/installation/) +2. Run `redocly lint openapi.yaml` (Docs on their lint command: [https://redocly.com/docs/cli/commands/lint/](https://redocly.com/docs/cli/commands/lint/)) - - Resolve any errors that appear by looking up error codes here: https://redocly.com/docs/cli/rules/recommended/ + - Resolve any errors that appear by looking up error codes here: [https://redocly.com/docs/cli/rules/recommended/](https://redocly.com/docs/cli/rules/recommended/) -3. Log in if you have Redocly credentials to use the premium version (the community version also works, but does not have the ["Try It"](https://redocly.com/docs/api-reference-docs/guides/try-it-console/) feature) +3. Log in if you have Redocly credentials to use the premium version (the community version also works, but does not have the ["Try It"](https://redocly.com/docs/api-reference-docs/guides/try-it-console/) feature) - - To Log in run `redocly login` (then follow the instructions) + - To Log in run `redocly login` (then follow the instructions) -4. Run `redocly preview-docs json_api.yaml` - https://redocly.com/docs/cli/commands/preview-docs/ -5. In order to use the "Try it!" feature to see if the specification can be used to send a valid request and correctly validate a real response, you'll need to get around CORS errors. One way to do that is to run this script to create an unprotected Chrome, then view your generated docs from there: `open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security` +4. Run `redocly preview-docs openapi.yaml` - [https://redocly.com/docs/cli/commands/preview-docs/](https://redocly.com/docs/cli/commands/preview-docs/) +5. In order to use the "Try it!" feature to see if the specification can be used to send a valid request and correctly validate a real response, you'll need to get around CORS errors. One way to do that is to run this script to create an unprotected Chrome, then view your generated docs from there: `open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security` -# How to add a new Amendment +## How to add a new Amendment New Amendments usually introduce new transactions and/or requests. Please follow [these](./add-a-new-request.md#how-to-add-a-new-request) [documents](./add-a-new-transaction.md#how-to-add-a-new-transaction) for implementing changes, in addition to updating the rippled API version spec as detailed [here](./add-a-new-rippled-api-version.md). -# Plan & Actions +## Plan & Actions We targets toward the end of November 2024 to have a first version available, not necessarily encompassing all the below tasks. @@ -113,16 +113,16 @@ AsyncAPI Docs Work - [ ] Upgrade XRPL AI to include AI function calling that allows the bot to execute commands automatically against the XRPL simply by reading the API specification - [ ] Integrate OpenAPI and AsyncAPI into Redocly, including styling -# Future work +## Future work - [ ] Publish specs to other package managers such as Cargo (for Rust) -- [ ] Work with https://xrplcluster.com to see about integration +- [ ] Work with [https://xrplcluster.com](xrplcluster) to see about integration ## Moving to OpenAPI 4.0 due to limitation of OpenAPI 3.0 mapping input parameters to exact output response objects The `discriminator` property on input parameters can map input parameters to input schemas, but it does not do the same for mapping input parameters to response schema. -``` +```yaml paths: /: post: diff --git a/docs/contributing/async-api-id-definition.md b/docs/contributing/async-api-id-definition.md new file mode 100644 index 0000000..240dab6 --- /dev/null +++ b/docs/contributing/async-api-id-definition.md @@ -0,0 +1,103 @@ +# Contribution Guidelines for AsyncAPI Specifications + +This document outlines the guidelines contributors must follow when working on the AsyncAPI specifications, focusing on the use of **`$id`**. Proper usage of `$id` ensures smooth code generation, schema identification, and maintains clarity within complex, nested components. + +--- + +## Why `$id` is Important + +The `$id` property serves multiple purposes in the context of AsyncAPI specifications, including: + +1. **Unique Identification**: It provides a unique identifier for schema components, enabling reuse without conflicts. +2. **Code Generation Support**: When used consistently, `$id` ensures the AsyncAPI code generator can generate interfaces or types with meaningful, unique names. +3. **Version Control**: It helps differentiate between versions or variations of similar components (e.g., `TransactionV1`, `TransactionV2`). +4. **Avoiding Conflicts**: Using `$id` in nested and reusable objects prevents ambiguity when multiple components are referenced or extended across schemas. +5. **Clarity and Maintainability**: Properly assigned `$id` values make the specification easier to read, maintain, and extend over time. + +--- + +## When and Where to Use `$id` + +To ensure consistency and reliability, the `$id` property **must be used in the following scenarios**: + +1. **Top-Level Schema Definitions**: + - **Situation**: When creating new schemas or message components under `components/schemas` or `components/messages`. + - **Reason**: Ensures that each schema is uniquely identifiable and properly named during code generation. + + **Example**: + ```yaml + components: + schemas: + PaymentTransactionV2: + $id: PaymentTransactionV2 + type: object + properties: + ... + ``` + +2. **Reusable or Shared Components**: + - **Situation**: When defining nested objects or arrays that are used across multiple schemas (e.g., `Memo`, `Warning`, `PathStep`). + - **Reason**: These components need to be uniquely identifiable to prevent conflicts during code generation and ensure reusability. + + **Example**: + ```yaml + properties: + warnings: + type: array + items: + $id: Warning + type: object + properties: + ... + ``` + +3. **Nested Objects with Distinct Purpose**: + - **Situation**: When an object inside another schema has a specific role or is reused across different schemas (e.g., `TransactionType` or `CurrencyAmount`). + - **Reason**: Assigning an `$id` helps the generator create unique interfaces for these nested components, preventing naming issues. + + **Example**: + ```yaml + properties: + TransactionType: + $id: TransactionType + type: string + enum: ["Payment", "Transfer"] + ``` + +4. **Extended or Composed Schemas**: + - **Situation**: When using `allOf` to extend or compose schemas from multiple components (e.g., `BaseTransaction` reused across different versions). + - **Reason**: Each extended version should have a unique `$id` to ensure the code generator distinguishes between them and maintains version clarity. + + **Example**: + ```yaml + allOf: + - $id: BaseTransaction + type: object + properties: + ... + - $id: PaymentTransactionBase + type: object + properties: + ... + ``` + +5. **Versioned Components**: + - **Situation**: When maintaining multiple versions of a schema (e.g., `TransactionV1`, `TransactionV2`). + - **Reason**: Using `$id` to reflect the version ensures the code generator can generate appropriately named types for each version. + +--- + +## Best Practices for Defining `$id` + +- **Use Descriptive Names**: The value of `$id` should clearly describe the component's role (e.g., `Memo`, `Warning`, `PathStep`). +- **Maintain Consistent Versioning**: When creating new versions of a component, increment the version in the `$id` value (e.g., `TransactionV1`, `TransactionV2`). +- **Apply `$id` to Nested and Shared Components**: Even if the component is part of another schema, assign an `$id` if it has a unique role or is used in multiple places. + +--- + +## Summary + +By following these guidelines, contributors ensure that: +- The AsyncAPI specification remains consistent and maintainable. +- The code generator can create well-defined, conflict-free interfaces. +- Each schema and component is uniquely identifiable and reusable. \ No newline at end of file diff --git a/generate-specs.js b/generate-specs.js deleted file mode 100644 index 5dbc429..0000000 --- a/generate-specs.js +++ /dev/null @@ -1,23 +0,0 @@ -const $RefParser = require('@apidevtools/json-schema-ref-parser') -const fs = require('fs') - -if (!fs.existsSync('./dist')){ - fs.mkdirSync('./dist'); -} - -$RefParser - .dereference('./async_api/websocket_api.yaml') - .then((schema) => { - fs.writeFileSync('dist/async_api.json', JSON.stringify(schema, null, 2)) - }) - // .then(() => $RefParser.dereference('./open_api/json_api.yaml')) - // .then((schema) => { - // // Deleting the licence key as it is not needed for codegenerators - // delete schema?.info?.license; - // fs.writeFileSync('dist/open_api.json', JSON.stringify(schema, null, 2)) - // }) - .catch((err) => { - console.error(err) - }).finally(() => { - console.log("Generation process completed"); - }) diff --git a/open_api/README.md b/open_api/README.md new file mode 100644 index 0000000..8e4245f --- /dev/null +++ b/open_api/README.md @@ -0,0 +1,21 @@ +# XRPL OpenAPI Specification + +This package provides the OpenAPI specification for the XRP Ledger ([XRPL](https://xrpl.org)) JSON-RPC API. + +## Installation + +Install the package via npm: + +```bash +npm install @xrpl/rippled-openapi-spec +``` + +## Usage + +Once installed, import the OpenAPI specification file directly from the package: + +```javascript +import xrplSpec from '@xrpl/rippled-openapi-spec/openapi.yaml' +``` + +You can then use the specification with tools like Swagger, Postman, or OpenAPI clients to [generate client libraries](https://github.com/ripple/openapi-codegen-xrpl). diff --git a/open_api/package.json b/open_api/package.json new file mode 100644 index 0000000..daa643d --- /dev/null +++ b/open_api/package.json @@ -0,0 +1,19 @@ +{ + "name": "@xrpl/rippled-openapi-spec", + "version": "1.0.0", + "description": "OpenAPI Specification for the XRPL rippled API", + "author": "Ripple", + "repository": { + "type": "git", + "url": "https://github.com/ripple/rippled-api-spec.git" + }, + "keywords": [ + "openapi", + "openapi-spec", + "xrpl", + "rippled" + ], + "license": "MIT", + "main": "openapi.yaml", + "sideEffects": false +} diff --git a/package-lock.json b/package-lock.json index 6ef803c..0e682ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "@redocly/realm": "^0.86.4" }, "devDependencies": { - "@apidevtools/json-schema-ref-parser": "^11.7.0", + "npm-run-all": "^4.1.5", "prettier": "3.2.5" } }, @@ -25,23 +25,6 @@ "node": ">=6.0.0" } }, - "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.0.tgz", - "integrity": "sha512-pRrmXMCwnmrkS3MLgAIW5dXRzeTv6GLjkjb4HmxNnvAKXN1Nfzp4KmGADBQvlVUcqi+a5D+hfGDLLnd5NnYxog==", - "dev": true, - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.15", - "js-yaml": "^4.1.0" - }, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/philsturgeon" - } - }, "node_modules/@asyncapi/avro-schema-parser": { "version": "3.0.24", "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.24.tgz", @@ -2049,12 +2032,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", - "dev": true - }, "node_modules/@jsep-plugin/regex": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.3.tgz", @@ -5894,8 +5871,7 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "peer": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graphql": { "version": "15.8.0", @@ -6060,6 +6036,12 @@ "node": ">=16.0.0" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/hotkeys-js": { "version": "3.13.7", "resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.13.7.tgz", @@ -6621,8 +6603,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "peer": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/isomorphic-dompurify": { "version": "0.13.0", @@ -8491,6 +8472,12 @@ "node": ">=4" } }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -8584,6 +8571,43 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -8736,6 +8760,15 @@ "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -8841,6 +8874,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "peer": true }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "node_modules/nimma": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.2.tgz", @@ -8935,6 +8974,27 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -8943,6 +9003,120 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -9254,6 +9428,27 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", @@ -9880,6 +10075,32 @@ "react-dom": ">=16" } }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg/node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -10173,6 +10394,15 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/should": { "version": "13.2.3", "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", @@ -10333,6 +10563,38 @@ "source-map": "^0.6.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -10409,6 +10671,24 @@ "node": ">=8" } }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -11163,6 +11443,16 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", @@ -11506,17 +11796,6 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, - "@apidevtools/json-schema-ref-parser": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.0.tgz", - "integrity": "sha512-pRrmXMCwnmrkS3MLgAIW5dXRzeTv6GLjkjb4HmxNnvAKXN1Nfzp4KmGADBQvlVUcqi+a5D+hfGDLLnd5NnYxog==", - "dev": true, - "requires": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.15", - "js-yaml": "^4.1.0" - } - }, "@asyncapi/avro-schema-parser": { "version": "3.0.24", "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.24.tgz", @@ -12984,12 +13263,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", - "dev": true - }, "@jsep-plugin/regex": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.3.tgz", @@ -15936,8 +16209,7 @@ "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "peer": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "graphql": { "version": "15.8.0", @@ -16061,6 +16333,12 @@ "resolved": "https://registry.npmjs.org/hono/-/hono-4.2.9.tgz", "integrity": "sha512-59FAv52UxDWUt/NlC0NzrRCjeVCThUnVlqlrKYm+k80XujBu6uJwBIa5gACKKZWobjA0MJ6Vds0I3URKf383Cw==" }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "hotkeys-js": { "version": "3.13.7", "resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.13.7.tgz", @@ -16416,8 +16694,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "peer": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "isomorphic-dompurify": { "version": "0.13.0", @@ -17790,6 +18067,12 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -17859,6 +18142,36 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true + } + } + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -17983,6 +18296,12 @@ "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -18052,6 +18371,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "peer": true }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "nimma": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.2.tgz", @@ -18113,11 +18438,118 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + } + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -18347,6 +18779,18 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true + }, "pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", @@ -18758,6 +19202,28 @@ "integrity": "sha512-A+tt+x9wdgZiZjv0e2WzYLD3IfFwJALaRaqwrCSXGjo0iQdsry/EtBEbQXRSmQs7cHmOi5eytCiSlOm8k4C+dg==", "requires": {} }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + } + } + }, "readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -18968,6 +19434,12 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "peer": true }, + "shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true + }, "should": { "version": "13.2.3", "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", @@ -19101,6 +19573,38 @@ "source-map": "^0.6.0" } }, + "spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -19167,6 +19671,18 @@ "strip-ansi": "^6.0.1" } }, + "string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + } + }, "string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -19703,6 +20219,16 @@ "convert-source-map": "^2.0.0" } }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", diff --git a/package.json b/package.json index 2263edd..59e5f11 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,16 @@ { "scripts": { "template": "node addRequestTemplate.js", - "bundle": "redocly bundle open_api/json_api.yaml --output dist/openapi && node generate-specs.js" + "package:openapi": "mkdir -p dist/openapi && cp open_api/README.md dist/openapi/README.md && cp open_api/package.json dist/openapi/package.json", + "package:asyncapi": "mkdir -p dist/asyncapi && cp async_api/README.md dist/asyncapi/README.md && cp async_api/package.json dist/asyncapi/package.json", + "bundle:openapi": "redocly bundle open_api/json_api.yaml --output dist/openapi/openapi.yaml", + "bundle:asyncapi": "redocly bundle async_api/websocket_api.yaml -o dist/asyncapi/asyncapi -d --ext json", + "build:openapi": "run-p bundle:openapi package:openapi", + "build:asyncapi": "run-p bundle:asyncapi package:asyncapi", + "build": "run-p build:openapi build:asyncapi" }, "devDependencies": { - "@apidevtools/json-schema-ref-parser": "^11.7.0", + "npm-run-all": "^4.1.5", "prettier": "3.2.5" }, "dependencies": { diff --git a/shared/base.yaml b/shared/base.yaml index 062b216..e737b18 100644 --- a/shared/base.yaml +++ b/shared/base.yaml @@ -50,6 +50,7 @@ components: type: boolean description: Indicates whether the request was forwarded. status: + $id: StatusSuccess type: string description: The status of the response (e.g., 'success'). enum: @@ -181,6 +182,7 @@ components: Memo: type: object + $id: Memo properties: MemoData: type: string diff --git a/shared/requests/account_info.yaml b/shared/requests/account_info.yaml index bd31919..6aaae73 100644 --- a/shared/requests/account_info.yaml +++ b/shared/requests/account_info.yaml @@ -1,6 +1,7 @@ components: schemas: AccountInfoRequest: + $id: AccountInfoRequestPayload summary: > The account_info command retrieves information about an account, its activity, and its XRP balance. All information retrieved is relative to a particular version of the ledger. @@ -25,6 +26,7 @@ components: - account AccountRoot: + $id: AccountRoot type: object description: An AccountRoot ledger entry type describes a single account, its settings, and XRP balance. properties: @@ -114,9 +116,12 @@ components: - Sequence AccountRootWithSignerLists: + type: object + $id: AccountRootWithSignerLists allOf: - $ref: '#/components/schemas/AccountRoot' - type: object + $id: SignerListBase properties: signer_lists: type: array @@ -126,6 +131,7 @@ components: AccountFlags: type: object + $id: AccountFlags properties: defaultRipple: type: boolean @@ -168,6 +174,7 @@ components: description: If true, the account requires a destination tag on all payments it receives. Transactions: + $id: Transactions type: object properties: auth_change: @@ -187,6 +194,7 @@ components: description: The Sequence Number of this transaction. QueueData: + $id: QueueData type: object properties: txn_count: @@ -211,6 +219,7 @@ components: $ref: '#/components/schemas/Transactions' SignerEntry: + $id: SignerEntry type: object properties: Account: @@ -227,6 +236,7 @@ components: format: Hash256 SignerList: + $id: SignerList type: object properties: LedgerEntryType: @@ -271,6 +281,7 @@ components: allOf: - $ref: '../base.yaml#/components/schemas/BaseSuccessResponse' - type: object + $id: AccountInfoSuccessResponseBaseData properties: account_flags: $ref: '#/components/schemas/AccountFlags' @@ -289,10 +300,11 @@ components: description: True if this data is from a validated ledger version; if omitted or set to false, this data is not final. AccountInfoSuccessResponseV1: - $id: AccountInfoResponseSuccess + $id: AccountInfoSuccessResponseV1Data allOf: - $ref: '#/components/schemas/AccountInfoSuccessResponseBase' - type: object + $id: AccountData properties: account_data: $ref: '#/components/schemas/AccountRootWithSignerLists' @@ -302,6 +314,7 @@ components: allOf: - $ref: '#/components/schemas/AccountInfoSuccessResponseBase' - type: object + $id: AccountInfoSuccessResponseV2Data properties: account_data: $ref: '#/components/schemas/AccountRoot' @@ -327,6 +340,7 @@ components: AccountInfoErrorResponse: type: object + $id: AccountInfoErrorResponseData properties: error: type: string diff --git a/shared/requests/account_lines.yaml b/shared/requests/account_lines.yaml index 202afae..15b8206 100644 --- a/shared/requests/account_lines.yaml +++ b/shared/requests/account_lines.yaml @@ -1,6 +1,7 @@ components: schemas: AccountLinesRequest: + $id: AccountLinesRequest summary: > The account_lines command retrieves information about an account's trust lines, including balances in all non-XRP currencies and assets. All information retrieved is relative to a particular version of the ledger. @@ -55,13 +56,17 @@ components: description: If true, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. AccountLinesErrorResponse: + $id: AccountLinesErrorResponseData type: object properties: error: type: string + $id: AccountLinesErrorString oneOf: - $ref: '../base.yaml#/components/schemas/UniversalErrorResponseCodes' - - enum: + - type: string + $id: AccountLinesErrorResponseCodes + enum: - invalidParams - actNotFound - lgrNotFound @@ -73,6 +78,7 @@ components: * `actMalformed` - If the `marker` field provided is not acceptable. status: type: string + $id: AccountLinesStatusError enum: - error request: @@ -83,6 +89,7 @@ components: - request TrustLine: + $id: TrustLine type: object properties: account: diff --git a/shared/requests/ledger_entry.yaml b/shared/requests/ledger_entry.yaml index df0d298..eb6b2d1 100644 --- a/shared/requests/ledger_entry.yaml +++ b/shared/requests/ledger_entry.yaml @@ -1,6 +1,7 @@ components: schemas: BaseLedgerEntryRequest: + $id: BaseLedgerEntryRequest type: object properties: binary: @@ -12,6 +13,7 @@ components: LedgerEntryRequestOptions: type: object + $id: LedgerEntryRequestOptions oneOf: - $ref: '#/components/schemas/LedgerEntryByID' - $ref: '#/components/schemas/AccountRootEntry' @@ -30,6 +32,7 @@ components: # Ledger entry request message LedgerEntryRequest: + $id: LedgerEntryRequestPayload summary: > The ledger_entry method returns a single ledger entry from the XRP Ledger in its raw format. All information retrieved is relative to a particular version of the ledger. @@ -43,6 +46,7 @@ components: - $ref: '#/components/schemas/LedgerEntryRequestOptions' LedgerEntryByID: + $id: LedgerEntryByID type: object description: Retrieve any type of ledger object by its unique ID. properties: @@ -51,6 +55,7 @@ components: description: The ledger entry ID of a single entry to retrieve from the ledger, as a 64-character (256-bit) hexadecimal string. AccountRootEntry: + $id: AccountRootEntry type: object description: Retrieve an AccountRoot entry by its address. This is roughly equivalent to the account_info method. properties: @@ -59,6 +64,7 @@ components: description: The classic address of the AccountRoot entry to retrieve. AMMEntry: + $id: AMMEntry type: object description: Retrieve an Automated Market-Maker (AMM) object from the ledger. This is similar to amm_info method, but the ledger_entry version returns only the ledger entry as stored. properties: @@ -76,6 +82,7 @@ components: - asset2 BridgeEntry: + $id: BridgeEntry type: object description: Retrieve a Bridge entry, which represents a single cross-chain bridge that connects the XRP Ledger with another blockchain. properties: @@ -103,6 +110,7 @@ components: - bridge DirectoryNodeEntry: + $id: DirectoryNodeEntry type: object description: Retrieve a DirectoryNode, which contains a list of other ledger objects. properties: @@ -119,6 +127,7 @@ components: type: string OfferEntry: + $id: OfferEntry type: object description: Retrieve an Offer entry, which defines an offer to exchange currency. properties: @@ -136,6 +145,7 @@ components: - seq OracleEntry: + $id: OracleEntry type: object description: Retrieve an Oracle entry, which represents a single price oracle that can store token prices. properties: @@ -151,6 +161,7 @@ components: - oracle_document_id RippleStateEntry: + $id: RippleStateEntry type: object description: Retrieve a RippleState entry, which tracks a (non-XRP) currency balance between two accounts. properties: @@ -170,6 +181,7 @@ components: - currency CheckEntry: + $id: CheckEntry type: object description: Retrieve a Check entry, which is a potential payment that can be cashed by its recipient. properties: @@ -177,6 +189,7 @@ components: type: string EscrowEntry: + $id: EscrowEntry type: object description: Retrieve an Escrow entry, which holds XRP until a specific time or condition is met. properties: @@ -194,6 +207,7 @@ components: - seq PayChannelEntry: + $id: PayChannelEntry type: object description: Retrieve a PayChannel entry, which holds XRP for asynchronous payments. properties: @@ -201,6 +215,7 @@ components: type: string DepositPreauthEntry: + $id: DepositPreauthEntry type: object description: Retrieve a DepositPreauth entry, which tracks preauthorization for payments to accounts requiring Deposit Authorization. properties: @@ -218,6 +233,7 @@ components: - authorized TicketEntry: + $id: TicketEntry type: object description: Retrieve a Ticket entry, which represents a sequence number set aside for future use. properties: @@ -235,6 +251,7 @@ components: - ticket_seq NFTPageEntry: + $id: NFTPageEntry type: object description: Return an NFT Page in its raw ledger format. properties: @@ -242,6 +259,7 @@ components: type: string LedgerEntrySuccessResponse: + $id: LedgerEntrySuccessResponse description: The response for a successful ledger_entry request, containing the requested ledger entry data. allOf: - $ref: '../base.yaml#/components/schemas/BaseSuccessResponse' @@ -249,6 +267,7 @@ components: properties: result: type: object + $id: LedgerEntrySuccessResponseData properties: index: type: string @@ -267,6 +286,7 @@ components: description: (Clio server only, returned if include_deleted parameter is set.) The ledger index where the ledger entry object was deleted. LedgerEntryErrorResponse: + $id: LedgerEntryErrorResponse description: The response for an unsuccessful ledger_entry request, containing error information. type: object properties: diff --git a/shared/requests/submit.yaml b/shared/requests/submit.yaml index ecf4800..8d31353 100644 --- a/shared/requests/submit.yaml +++ b/shared/requests/submit.yaml @@ -1,16 +1,21 @@ components: schemas: SubmitRequestV1: + $id: SubmitRequestV1 + type: object oneOf: - $ref: '#/components/schemas/SubmitOnlyMode' - $ref: '#/components/schemas/SignAndSubmitModeV1' SubmitRequestV2: + $id: SubmitRequestV2 + type: object oneOf: - $ref: '#/components/schemas/SubmitOnlyMode' - $ref: '#/components/schemas/SignAndSubmitModeV2' SubmitOnlyMode: + $id: SubmitOnlyMode description: A submit-only request for submitting transactions. type: object properties: @@ -24,6 +29,7 @@ components: - tx_blob SignAndSubmitModeBase: + $id: SignAndSubmitModeBase description: A mode for signing a transaction and immediately submitting it. This mode is intended for testing. type: object properties: @@ -59,35 +65,31 @@ components: description: '(Optional) Sign-and-submit fails with the error rpcHIGH_FEE if the auto-filled Fee value would be greater than the reference transaction cost x fee_mult_max ÷ fee_div_max. This field has no effect if you explicitly specify the Fee field of the transaction. Default is 1.' SignAndSubmitModeV1: + $id: SignAndSubmitModeV1 type: object allOf: - $ref: '#/components/schemas/SignAndSubmitModeBase' - properties: - tx_json: - type: object - discriminator: - propertyName: TransactionType - mapping: - Payment: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV1' - oneOf: - - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV1' - # TODO: Add other transaction types here + - properties: + tx_json: + type: object + discriminator: TransactionType + oneOf: + - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV1' + # TODO: Add other transaction types here - description: 'Transaction definition in JSON format, optionally omitting any auto-fillable fields.' + description: 'Transaction definition in JSON format, optionally omitting any auto-fillable fields.' required: - tx_json SignAndSubmitModeV2: + $id: SignAndSubmitModeV2 type: object allOf: - $ref: '#/components/schemas/SignAndSubmitModeBase' properties: tx_json: type: object - discriminator: - propertyName: TransactionType - mapping: - Payment: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV2' + discriminator: TransactionType oneOf: - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV2' # TODO: Add other transaction types here @@ -96,6 +98,7 @@ components: - tx_json SubmitSuccessResponseBase: + $id: SubmitSuccessResponseBase allOf: - $ref: '../base.yaml#/components/schemas/BaseSuccessResponse' - type: object @@ -157,43 +160,40 @@ components: (The transaction could only have been validated in this ledger version or earlier if it had already been submitted before.) SubmitSuccessResponseV1: + $id: SubmitSuccessResponseV1 type: object allOf: - $ref: '#/components/schemas/SubmitSuccessResponseBase' properties: tx_json: - discriminator: - propertyName: TransactionType - mapping: - Payment: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV1' - # TODO: Add other transaction types here + discriminator: TransactionType oneOf: - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV1' # TODO: Add other transaction types here SubmitSuccessResponseV2: + $id: SubmitSuccessResponseV2 type: object allOf: - $ref: '#/components/schemas/SubmitSuccessResponseBase' properties: tx_json: - discriminator: - propertyName: TransactionType - mapping: - Payment: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV2' - # TODO: Add other transaction types here + discriminator: TransactionType oneOf: - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV2' # TODO: Add other transaction types here SubmitErrorResponse: + $id: SubmitErrorResponse type: object properties: error: type: string oneOf: - $ref: '../base.yaml#/components/schemas/UniversalErrorResponseCodes' - - enum: + - type: string + $id: SubmitErrorString + enum: - amendmentBlocked - highFee - internalJson @@ -217,6 +217,7 @@ components: * `notSupported` - Signing is not supported by this server (Sign-and-Submit mode only.) If you are the server admin, you can still access signing when connected as an admin, or you could enable public signing. status: type: string + $id: SubmitErrorStatus enum: - error request: diff --git a/shared/transactions/payment.yaml b/shared/transactions/payment.yaml index 32cf23d..8c9fd56 100644 --- a/shared/transactions/payment.yaml +++ b/shared/transactions/payment.yaml @@ -10,8 +10,10 @@ components: - $ref: '../base.yaml#/components/schemas/BaseTransaction' properties: TransactionType: + $id: TransactionType type: string - enum: [Payment] + enum: + - Payment DeliverMin: $ref: '../base.yaml#/components/schemas/CurrencyAmount' description: '(Optional) Minimum amount of destination currency this transaction should deliver. Only valid if this is a partial payment. For non-XRP amounts, the nested field names are lower-case.'