8000 JSON schema form 2020-12 draft support by gusevda · Pull Request #4079 · giantswarm/happa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JSON schema form 2020-12 draft support #4079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"@rjsf/validator-ajv8": "5.1.0",
"@sentry/react": "7.36.0",
"@sentry/tracing": "7.36.0",
"ajv": "^8.12.0",
"bootstrap": "3.4.1",
"bowser": "2.11.0",
"clean-deep": "3.4.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IChangeEvent } from '@rjsf/core';
import { EnumOptionsType, RJSFSchema } from '@rjsf/utils';
import validator from '@rjsf/validator-ajv8';
import { customizeValidator } from '@rjsf/validator-ajv8';
import Ajv2020 from 'ajv/dist/2020';
import { useAuthProvider } from 'Auth/MAPI/MapiAuthProvider';
import cleanDeep from 'clean-deep';
import { push, replace } from 'connected-react-router';
Expand Down Expand Up @@ -48,6 +49,8 @@ import {
prototypeSchemas,
} from './schemaUtils';

const validator = customizeValidator({ AjvClass: Ajv2020 });

const Wrapper = styled.div`
position: relative;
margin: auto;
Expand Down
9 changes: 1 addition & 8 deletions src/components/UI/JSONSchemaForm/test.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"arrayFields": {
"properties": {
Expand Down Expand Up @@ -152,13 +152,6 @@
"title": "Integer",
"type": "integer"
},
"integerLimit": {
"description": "Integer field with minimum value 2 and maximum value 5.",
"title": "Integer with min/max values",
"type": "integer",
"maximum": 5,
"minimum": 2
},
"integerEnum": {
"description": "Integer field with enumerated values and custom labels.",
"oneOf": [
Expand Down
0