openclaw - ✅(Solved) Fix [Feature]: Add public json schema via http access [1 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#55002Fetched 2026-04-08 01:33:49
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2closed ×1commented ×1labeled ×1

Add public link to http JSON schema per version

Root Cause

Add public link to http JSON schema per version

PR fix notes

PR #55390: WIP feat(cli): sync local schema artifacts on startup

Description (problem / solution / changelog)

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: JSON schema for the config is should be manually set for new and existing configs and updated afterwards
  • Why it matters: It's inconvenient to bother about it
  • What changed: Added local json schema for the config that is updated after release ver bumps (optional, true by default)
  • What did NOT change (scope boundary): config or schema itself was not changed, only whe way how it's delivered to the end user

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Close #55235
  • Close #22278
  • Related #55002

Root Cause / Regression History (if applicable)

N/A

Regression Test Plan (if applicable)

N/A

User-visible / Behavior Changes

in openclaw.json, the $schema field will appear that will point to the local file with the schema, and the schema file itself. This is optional and enabled by default.

if user has already set the schema path, then it will not be updated

if the new release is rolled out, then the schema will be updated

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
  1. When no schema is present, it's added to the config, and a schema file is generated
  2. On re-run, it's untouched
  3. After the version change, the openclaw_schema file is updated
  4. After openclaw.json is edited, it's explicitly noted to the user
  • Edge cases checked:
  • What you did not verify:

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (Yes)
  • Migration needed? (No)

AI Assistance

Pr was done with the assistance of Opencode + OMO, mostly with GPT 5.4 model I understand what this code is doing

Changed files

  • docs/cli/config.md (modified, +3/-1)
  • docs/cli/update.md (modified, +1/-0)
  • src/cli/config-cli.test.ts (modified, +4/-0)
  • src/cli/config-cli.ts (modified, +2/-12)
  • src/cli/program/preaction.test.ts (modified, +35/-0)
  • src/cli/program/preaction.ts (modified, +12/-0)
  • src/cli/run-main.exit.test.ts (modified, +41/-0)
  • src/cli/run-main.ts (modified, +14/-0)
  • src/config/config-misc.test.ts (modified, +20/-0)
  • src/config/io.ts (modified, +20/-0)
  • src/config/io.write-config.test.ts (modified, +94/-0)
  • src/config/local-json-schema.test.ts (added, +105/-0)
  • src/config/local-json-schema.ts (added, +105/-0)
  • src/config/schema-base.ts (modified, +12/-3)
  • src/config/schema.base.generated.ts (modified, +9/-0)
  • src/config/schema.help.ts (modified, +2/-0)
  • src/config/schema.labels.ts (modified, +1/-0)
  • src/config/types.openclaw.ts (modified, +2/-0)
  • src/config/zod-schema.ts (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Summary

Add public link to http JSON schema per version

Problem to solve

After the merge of #54523, it was added the ability to generate a JSON schema was added, but it requires the user to do extra actions to connect it. Instead, it should be a static http links to it with the latest schema version and schemas per release.

Proposed solution

Add a GH action that will generate the released and the latest schemas on the new version release. If the user wants to use the edge (dev) version of the repo, he/she can use CLI generator for that

Alternatives considered

Use it as it is (less convenient)

Impact

Evidence/examples

No response

AI Agent instructions

  • The schema should be pointing to the repo https://github.com/openclaw/openclaw
  • The schema for the current release should be accessible from the repo path schemas/openclaw.json/latest/schema.json
  • The historical schemas should be in schemas/openclaw.json/[release_version]/schema.json
  • Schemas for older releases are not required
  • The generation of the new schema should be happening in the GitHub action workflow/job in the new release process
  • With the default setup, the schema should be pointing to schemas/openclaw.json/latest/schema.json, allowing the user to change the path to the file completely
  • In the dev provess there should be an option to test the proposed solution to confirm the results
  • The docs must be updated in a brief way, revealing the options that the user has, following the formatting that doc files have
  • The changes in files should be minimal, no unnecessary changes like unrelated typos fixes or MD files formatting, do only what is this issue describes
  • Follow KISS, DRY, and YNGNI principles
  • Tests must be added where possible

Additional information

Close #22278

Will contribute to this issue

extent analysis

Fix Plan

To add a public link to the HTTP JSON schema per version, we will create a GitHub Action that generates the latest schema and historical schemas on new version releases.

Step-by-Step Solution:

  • Create a new GitHub Action workflow file (e.g., .github/workflows/generate-schemas.yml) with the following content:
name: Generate Schemas
on:
  release:
    types: [created]
jobs:
  generate-schemas:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Generate schema
        run: |
          # Generate latest schema
          mkdir -p schemas/openclaw.json/latest
          node generate-schema.js > schemas/openclaw.json/latest/schema.json
          # Generate historical schema
          mkdir -p schemas/openclaw.json/${GITHUB_REF_NAME}
          node generate-schema.js > schemas/openclaw.json/${GITHUB_REF_NAME}/schema.json
      - name: Upload schema
        uses: actions/upload-artifact@v2
        with:
          name: schemas
          path: schemas/
  • Create a new JavaScript file (e.g., generate-schema.js) with the following content:
const { generateSchema } = require('./schema-generator');
const schema = generateSchema();
console.log(JSON.stringify(schema, null, 2));
  • Update the schema-generator module to export the generateSchema function.
  • Update the documentation to reflect the new schema location and options.

Verification

To verify that the fix worked, check the following:

  • The latest schema is generated and accessible at schemas/openclaw.json/latest/schema.json.
  • Historical schemas are generated and accessible at schemas/openclaw.json/[release_version]/schema.json.
  • The documentation reflects the new schema location and options.

Extra Tips

  • Make sure to test the proposed solution in the dev process to confirm the results.
  • Follow the KISS, DRY, and YNGNI principles to keep the changes minimal and focused on the issue at hand.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Feature]: Add public json schema via http access [1 pull requests, 1 comments, 1 participants]