From 3776f5c90f098eed06932bbf5a6db4628e8876c8 Mon Sep 17 00:00:00 2001 From: Justin Reynolds Date: Tue, 5 Nov 2024 17:01:16 -0600 Subject: [PATCH] fix: openapi to redocly cli --- README.md | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 57c5ac4..dc5fc48 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,20 @@ Semantic Versioning (Semver) is a versioning system that helps to avoid dependen With a machine readable spec, AI is capable of planning and running its own queries against the XRPL. This facilitates natural language queries and responses for easier interaction with the XRPL, streamlining onboarding for new developers by providing AI-driven tutorials and guides based on the spec. +## Running docs + +Install `@redocly/cli`: + +```bash +npm i -g @redocly/cli +``` + +Run the docs preview + +```bash +npm run preview +``` + ## Automated Testing Creating OpenAPI and AsyncAPI specifications for the XRPL will enable us to generate automated integration tests, allowing for the testing of many more parameters than would otherwise be possible. For instance, some commands have slight variations in input parameters that result in vastly different outputs, such as returning portions of the response as JSON versus a Blob. Given all the possible combinations, it's easy to overlook tests that cover every single path. With a machine-readable specification, we can ensure that all paths and options are thoroughly tested. diff --git a/package.json b/package.json index c264725..7a9f9c6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "scripts": { "template": "node addRequestTemplate.js", "bundle": "redocly bundle open_api/json_api.yaml --output dist/openapi && node generate-specs.js", - "preview": "openapi preview" + "preview": "redocly preview" }, "devDependencies": { "@apidevtools/json-schema-ref-parser": "^11.7.0",