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

fix(integer): support integer field type #11

Merged
merged 8 commits into from
Nov 20, 2024

Conversation

jguddas
Copy link
Contributor

@jguddas jguddas commented Jun 4, 2023

SON Schemas fields with type: "integer" allow values like 1.5.
Now in this PR they are considered invalid. If you want 1.5 to be allowed, use type: "number".

Example:

{
  properties: {
    tabs: {
      title: 'Tabs',
      description: 'How many open tabs do you have?',
      'x-jsf-presentation': {
        inputType: 'number', // the inputType can remain number
      },
      minimum: 1,
      type: 'integer', // New!
    },
  },
};

Before:

  • {tabs: 2.5} // valid
  • {tabs: 2.5} // error: "Must not contain decimal points. E.g. 5 instead of 5.5"

@vercel
Copy link

vercel bot commented Jun 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
json-schema-form ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2023 10:32am

src/tests/helpers.js Outdated Show resolved Hide resolved
@jguddas jguddas requested a review from sandrina-p July 14, 2023 19:38
@sandrina-p
Copy link
Collaborator

Hi @jguddas! Could you update this with the main, and then we can merge it?

@jguddas
Copy link
Contributor Author

jguddas commented May 14, 2024

Hi @jguddas! Could you update this with the main, and then we can merge it?

Done.

@sandrina-p sandrina-p force-pushed the feat/support-integer-field-type branch from 88b175f to 724409f Compare November 19, 2024 18:47
@sandrina-p sandrina-p changed the title feat: support integer field type fix: support integer field type Nov 20, 2024
@sandrina-p sandrina-p changed the title fix: support integer field type fix(integer): support integer field type Nov 20, 2024
@sandrina-p sandrina-p requested a review from brennj November 20, 2024 13:11
@brennj
Copy link
Collaborator

brennj commented Nov 20, 2024

Approving!

@sandrina-p sandrina-p merged commit 14f3497 into remoteoss:main Nov 20, 2024
3 checks passed
@sandrina-p
Copy link
Collaborator

Merged and released @remoteoss/[email protected]. Once again, thank you @jguddas 🎉

@tomaspinho
Copy link

Hi @jguddas , thank you for your contribution! 😄

Wondering if you're using this library as part of your work at the LEGO group? It's really cool to see it used outside of Remote ❤️

@jguddas
Copy link
Contributor Author

jguddas commented Dec 4, 2024

Hi @jguddas , thank you for your contribution! 😄

Wondering if you're using this library as part of your work at the LEGO group? It's really cool to see it used outside of Remote ❤️

I have to disappoint you @tomaspinho, the contribution was just for fun, I just really like JSON schema.

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.

4 participants