Skip to content

Commit

Permalink
fix some schema descriptions (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl authored Nov 18, 2024
1 parent 121e78b commit 49a4501
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 61 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

> ## 0.1.2 (Unreleased)
>
> TBD
> - [#19] fixes some schema descriptions
>
> [#19]: https://github.com/deathbeds/urljsf/pull/19
## [0.1.1](https://github.com/deathbeds/urljsf/releases/tag/v0.1.1)

Expand Down
9 changes: 4 additions & 5 deletions js/schema/form.schema.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ description = """filters to ensure in `nunjucks` templates"""
items = {oneOf = [{"$ref" = "#/definitions/any-file-format"}]}
uniqueItems = true


# forms ########################################################################
[definitions.forms]
type = "object"
Expand Down Expand Up @@ -121,17 +120,17 @@ type = "object"
additionalProperties = false

[definitions.any-form.properties]
schema = {"$ref" = "#/definitions/any-schema", descripton = """
schema = {"$ref" = "#/definitions/any-schema", description = """
URL for a JSON schema to describe the this form: features not present in
Draft 7 are best-effort.
"""}
ui_schema = {"$ref" = "#/definitions/any-schema", descripton = """
ui_schema = {"$ref" = "#/definitions/any-schema", description = """
URL for an `rjsf` UI schema to describe how the `schema` will be presented
"""}
form_data = {"$ref" = "#/definitions/any-schema", descripton = """
form_data = {"$ref" = "#/definitions/any-schema", description = """
JSON-compatible initial data for this form
"""}
props = {"$ref" = "./props.schema.json#/definitions/Props", descripton = """
props = {"$ref" = "./props.schema.json#/definitions/Props", description = """
JSON-compatible subset of `rjsf` component properties for this form
"""}
order = {type = "number", description = """
Expand Down
8 changes: 4 additions & 4 deletions js/schema/v0/form.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,23 +431,23 @@
"properties": {
"form_data": {
"$ref": "#/definitions/any-schema",
"descripton": "JSON-compatible initial data for this form\n"
"description": "JSON-compatible initial data for this form\n"
},
"order": {
"type": "number",
"description": "the order in which to show a form, lowest (or omitted) first, with a tiebreaker on name\n"
},
"props": {
"$ref": "#/definitions/Props",
"descripton": "JSON-compatible subset of `rjsf` component properties for this form\n"
"description": "JSON-compatible subset of `rjsf` component properties for this form\n"
},
"schema": {
"$ref": "#/definitions/any-schema",
"descripton": "URL for a JSON schema to describe the this form: features not present in\nDraft 7 are best-effort.\n"
"description": "URL for a JSON schema to describe the this form: features not present in\nDraft 7 are best-effort.\n"
},
"ui_schema": {
"$ref": "#/definitions/any-schema",
"descripton": "URL for an `rjsf` UI schema to describe how the `schema` will be presented\n"
"description": "URL for an `rjsf` UI schema to describe how the `schema` will be presented\n"
}
},
"additionalProperties": false
Expand Down
13 changes: 8 additions & 5 deletions js/src/_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
*/
export type AnyTemplate = string | [string, ...string[]];
/**
* A schema-like object referenced by URL, or inline as an object
* JSON-compatible initial data for this form
*
*/
export type ASchema = SchemaByURL | InlineObject;
/**
Expand All @@ -22,11 +23,14 @@ export type ASchema = SchemaByURL | InlineObject;
*/
export type SchemaByURL = string;
/**
* A schema-like object referenced by URL, or inline as an object
* URL for a JSON schema to describe the this form: features not present in
* Draft 7 are best-effort.
*
*/
export type ASchema1 = SchemaByURL | InlineObject;
/**
* A schema-like object referenced by URL, or inline as an object
* URL for an `rjsf` UI schema to describe how the `schema` will be presented
*
*/
export type ASchema2 = SchemaByURL | InlineObject;
/**
Expand Down Expand Up @@ -170,9 +174,8 @@ export interface AnyForm {
*/
export interface InlineObject {}
/**
* JSON-compatible default values for `rjsf` [Form.props][props].
* JSON-compatible subset of `rjsf` component properties for this form
*
* [props]: https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/form-props
*/
export interface Props {
/**
Expand Down
Loading

0 comments on commit 49a4501

Please sign in to comment.