GithubHelp home page GithubHelp logo

Comments (3)

justin-tay avatar justin-tay commented on May 27, 2024

I don't really understand what you mean by set the value to the dimensions array.

If it helps the validation message contains the instanceNode that the instanceLocation points to. Note that if the keyword applies to an object or array the instanceNode will then be the object or array. For example the required and additionalProperties keywords are going to be pointing to an object.

from json-schema-validator.

Dloadinghao avatar Dloadinghao commented on May 27, 2024

I don't really understand what you mean by set the value to the dimensions array.

If it helps the validation message contains the instanceNode that the instanceLocation points to. Note that if the keyword applies to an object or array the instanceNode will then be the object or array. For example the required and additionalProperties keywords are going to be pointing to an object.

I 'm sorry, I 'm not good at English, which causes ambiguity in expression. For example, the name of the element with an index of 1 under the $.doc.schema _ query.dimensions group is server_ ip. I hope to display the value of server _ ip in the abnormal information, and the expected value is :
$.doc.schema _ query.dimensions [ server_ip ]

from json-schema-validator.

justin-tay avatar justin-tay commented on May 27, 2024

The $.doc.schema_query.dimensions[1] is the instanceLocation where the error has occurred so I don't know what you mean by $.doc.schema_query.dimensions[server_ip]. It would be clearer if you actually provided your schema, input data the actual message and what your expectations are, but it is unlikely that there is a built-in mechanism for what you want.

In this case you can get the value of $.doc.schema_query.dimensions[1] from instanceNode. If you want to incorporate the value into your message you will have to do some string manipulation of the message.

from json-schema-validator.

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.