Giter VIP home page Giter VIP logo

Comments (2)

nemesifier avatar nemesifier commented on July 22, 2024

For schema formatter definitions, do you mean things like:

{ "format": "ipv6" }

I'm currently working to implement this type of definition, I wrote down a note here:
openwisp/netjsonconfig#42

In the last few months I have usually worked on the spec with a bottom up approach: I tried implementing things first, and then chose the best approach between simplicity and expressiveness.

While implementing things (especially in the main netjsonconfig schema), and using existing implementations, I encountered a few issues that are pompting me to reconsider some initial ideas:

  • I'm thinking about publishing a reference NetJSON schema implementation separately from the RFC; It would serve as a reference implementation for others to use as a base to build their own schema; this will allow the NetJSON-Schema reference implementation to evolve faster than the prose RFC, which once published should evolve at a slower rate
  • formats in the current JSON-Schema v4 draft are not mandatory, so are not always implemented :-( - but I think it's a good idea to use them; we should also propose new formats like subnet (eg: 10.0.0.0/24) and network (eg: 192.168.5.24/23), but this will be a long term task

So 👍 for using formats (if I understood correctly) although I would prefer not to include the complete JSON-Schema in the RFC and just link to it.

Let me know what you think; I'd like to mark this as "accepted".

from netjson.

mitar avatar mitar commented on July 22, 2024

Yes, formatters is one (for strings). But maybe there are also other similar things. For example, for numeric values, we could define minimum and maximum values. Some values could be enums maybe. Things like that.

from netjson.

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.