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

Handling integers inside schema definition #22

Open
stijnvanhoey opened this issue Aug 13, 2018 · 0 comments
Open

Handling integers inside schema definition #22

stijnvanhoey opened this issue Aug 13, 2018 · 0 comments
Assignees

Comments

@stijnvanhoey
Copy link
Contributor

Consider the following example:

coordinateUncertaintyInMeters:
  empty: true
  if:
    - verbatimCoordinateSystem:
        allowed: UTM 1km
      numberformat: x
      allowed: 707
    - verbatimCoordinateSystem:
        allowed: UTM 5km
      numberformat: x
      allowed: 3536

Where the allowed values are somteimes integers (parsing this with default yaml-libraries). The question is how to handle this:

  • Always expect (when loading the yaml-schema) that allowed need to be strings and pre-format it as such after loading
  • Expect from the user to be explicit about the string, by requiring quotes: allowed: '3536'
  • Provide a 'SchemaError' (or 'SpecificationError'), stating that allowed need to be string/list as for integers, the combination min/max is provided. However what with allowed: ['4', '27']?
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

No branches or pull requests

2 participants