Skip to content
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

Adapt rate limit config schema to make it compatible with react-jsonschema-form #696

Merged
merged 5 commits into from
May 11, 2018

Conversation

davidor
Copy link
Contributor

@davidor davidor commented May 10, 2018

The rate limit policy has a valid configuration JSON schema. However, it cannot be rendered by react-jsonschema-form the library used in the 3scale UI to build HTML forms from the config schemas.

This PR solves the issue by adapting the schema. The library cannot render arrays of objects with different types, so I've split them into several arrays that have items of only one type. In particular, the properties causing issues in the UI library were limiters and error_settings.

This is a breaking change, but not between final versions. If you were using this policy in a previous release candidate or beta, your configuration will become invalid.

Ref: #695

…-jsonschema-form

react-jsonschema-form is the library used by the 3scale UI.
@y-tabata
Copy link
Contributor

@davidor I reviewed this PR and I created PR #697.
Others have no problem.

@davidor davidor force-pushed the adapt-rate-limit-policy-schema-to-react-jsonschema branch from 9e30b28 to 2b8a570 Compare May 11, 2018 08:29
@davidor davidor requested a review from mikz May 11, 2018 08:36
@davidor davidor changed the title [WIP] Adapt rate limit config schema to make it compatible with react-jsonschema-form Adapt rate limit config schema to make it compatible with react-jsonschema-form May 11, 2018
Copy link
Contributor

@mikz mikz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@davidor davidor merged commit 0a110cc into master May 11, 2018
mikz pushed a commit that referenced this pull request May 11, 2018
…-react-jsonschema

Adapt rate limit config schema to make it compatible with react-jsonschema-form
@mikz mikz mentioned this pull request May 11, 2018
@davidor davidor deleted the adapt-rate-limit-policy-schema-to-react-jsonschema branch May 11, 2018 14:27
@mikz mikz mentioned this pull request May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants