Git Product home page Git Product logo

Comments (10)

MikeRalphson avatar MikeRalphson commented on June 15, 2024 1

by the way, this should not be valid as pattern is not respected

There is nothing stopping you writing JSON Schemas which have contradictions. The component is an editor, not a JSON Schema validator.

If you think the handling of numeric entry for insanely large numbers is incorrect, the repo is here: https://github.com/josdejong/jsoneditor

from openapi-gui.

MikeRalphson avatar MikeRalphson commented on June 15, 2024

JSON doesn't support hexadecimal notation. Also this number is far too big to be represented accurately in JSON.

from openapi-gui.

Magicking avatar Magicking commented on June 15, 2024

I don't understand what JSON has to do with the problem I'm pointing.

The problem is that it converts the hexadecimal to a number where it should stay as a string (and not try to convert something without knowing what's the underlying type) as per the specification https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#data-types ยซ Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified. ยป

from openapi-gui.

MikeRalphson avatar MikeRalphson commented on June 15, 2024

The schema editor is for JSON Schema, that's what it's got to do with JSON.

The quote you pulled from the specification has to do with validating schemas based on the format keyword. That's irrelevant here.

from openapi-gui.

Magicking avatar Magicking commented on June 15, 2024

Ok, I think I was not clear in my explication.

Here, what's work https://imgur.com/r7U467y , you can see that the format is string and the example is a string as well (by the way, this should not be valid as pattern is not respected)
And where you enter this https://imgur.com/A5CgF9B and hit enter, the 0x... get converted to a number instead of staying as string as you can see here https://imgur.com/pZAJsAP

from openapi-gui.

Magicking avatar Magicking commented on June 15, 2024

Fair point, thank you! I'll see over there.

from openapi-gui.

Magicking avatar Magicking commented on June 15, 2024

The same behavior can't be reproduced in the latest version of the jsoneditor over at https://jsoneditoronline.org/ and the version of jsoneditor embedded is 3 years old, I guess the issue lies somewhere between the 5.7.2 and the latest 9.0.3 version!

from openapi-gui.

MikeRalphson avatar MikeRalphson commented on June 15, 2024

Ok, let me look at how much work it is to update the dependency. Thanks.

from openapi-gui.

MikeRalphson avatar MikeRalphson commented on June 15, 2024

Can you try now and see if the issue is resolved?

from openapi-gui.

Magicking avatar Magicking commented on June 15, 2024

The issue is not solved, the editor is way better though but I still need to add an extra _ to my example property if it's a hex string

from openapi-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.