|
| 1 | +/* |
| 2 | + * This file is a special file that houses |
| 3 | + * the schema definitions for this entire application. |
| 4 | + * |
| 5 | + * rjsf is used effectively throughout the application for many purposes, |
| 6 | + * and then can be edited for form edits. |
| 7 | + */ |
| 8 | +import { JSONSchema7 } from "json-schema"; |
| 9 | + |
| 10 | +/* |
| 11 | + * The following schema complies to iPython Kernel |
| 12 | + * Standards. When making changes, note that the UI |
| 13 | + * is also subject to change based on the types. |
| 14 | + */ |
| 15 | +export const iPySchema: JSONSchema7 = { |
| 16 | + title: "ipykernel mm", |
| 17 | + type: "object", |
| 18 | + properties: { |
| 19 | + argv: { type: "array", items: { type: "string" } }, |
| 20 | + env: { type: "object" }, |
| 21 | + display_name: { type: "string" }, |
| 22 | + language: { type: "string" }, |
| 23 | + interrupt_mode: { type: "string" }, |
| 24 | + metadata: { type: "object" }, |
| 25 | + }, |
| 26 | + required: [ |
| 27 | + "argv", |
| 28 | + "display_name", |
| 29 | + "env", |
| 30 | + "interrupt_mode", |
| 31 | + "language", |
| 32 | + "metadata", |
| 33 | + ], |
| 34 | +}; |
| 35 | + |
| 36 | +/* |
| 37 | + * This is the schema for the display cards rendered for |
| 38 | + * each kernel. It can be obtained by using the generation |
| 39 | + * function. When called on the ipyschema object, the function |
| 40 | + * returns a ipyCardSchema. |
| 41 | + */ |
| 42 | +export const iPyCardSchema: JSONSchema7 = { |
| 43 | + title: "iPyKernel Manager", |
| 44 | + type: "array", |
| 45 | + items: { |
| 46 | + type: "object", |
| 47 | + properties: { |
| 48 | + kernel_name: { type: "string" }, |
| 49 | + jupyter_name: { type: "string" }, |
| 50 | + }, |
| 51 | + }, |
| 52 | +}; |
0 commit comments