Giter VIP home page Giter VIP logo

Comments (4)

Grokzen avatar Grokzen commented on July 21, 2024

Hi. I will have a look at it during the day and get back to you.

from pykwalify.

Grokzen avatar Grokzen commented on July 21, 2024

From a quick look at your schema and data, it looks like you have either bad data or schema because you say that you want a dict at top level and it should contain employees but you then say that the content of it should be a sequence of items that each item contains a map with the key name

From what i can tell you should either change your data to this

employees:
  - name: John Doe

that is equal to this python data {"employees": [{"name": "John Doe"}]

or you need to change your schema to something like this

type: map
required: yes
mapping:
   employees:
     type: map
     required: yes
     mapping:
        name:
         type: str
         required: yes

to make it validate with your original data.

from pykwalify.

Grokzen avatar Grokzen commented on July 21, 2024

One thing i could agree to is that tougher validation could be done on the acctual data it is currently processing because it is not intended that when it is validating mappings it should only be possible on a dict but not on a string so that could/should throw a error that the data is not as expected.

from pykwalify.

Grokzen avatar Grokzen commented on July 21, 2024

Oh yeah, forgot to close this issue :]

from pykwalify.

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.