Skip to content

feat: support to export the JSON schema of APISIX via CLI #3022

Description

@membphis

discuss mail:
https://lists.apache.org/thread.html/rb1c19fe9b6e51ede3b5aead122e2bcd4de6249f42b971eabfb8a79ac%40%3Cdev.apisix.apache.org%3E

Because the dashboard project requires schema verification for plug-ins,
upstreams, etc., and the definition of the schema is written in the Lua
code of Apache APISIX. Therefore, we need a tool to generate a JSON schema
file based on the Lua code of Apache APISIX so that it can be used by the
Go and front-end code of the dashboard project.

If the developer want to sync the JSON schema, he/she should follow this step:

  1. export JSON schema file: call apisix export-jsonschema, we will get the file schema.json
  2. copy the file schema.json from apisix to the dashboard folder
  3. start the dashboard

those steps are much safer. and the dashboard does not need any update.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions