freifunk / freifunk/api.freifunk.net

Schema is invalid

Open Beginner friendly
#179 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Makefile
Stars
51
Forks
24
PR merge metrics
No merged PRs in 30d

Description

```
$ echo "{}" | check-jsonschema --schemafile ../0.5.3.json -
Error: schemafile was not valid

SchemaError: {'type': 'object', 'title': 'dns', 'properties': {'domainname': {'type': 'string', 'title': 'Domain Name', 'description': 'The domain name (e.g. ffhh, ffol)', 'pattern': '^[A-Za-z0-9äöüÄÖÜß\\.\\-\\_]{2,}$'}, 'nameserver': {'type': 'array', 'title': 'Nameserver', 'description': 'Nameservers servings zones of your domain', 'items': {'type': 'string', 'pattern': '^[A-Za-z0-9äöüÄÖÜß_\\-\\.:]*$'}}}, 'additionalProperties': False} is not valid under any of the given schemas

Failed validating 'anyOf' in metaschema['properties']['properties']['additionalProperties']['properties']['properties']['additionalProperties']['properties']['items']:
{'anyOf': [{'$ref': '#'}, {'$ref': '#/definitions/schemaArray'}],
'default': True}

On schema['properties']['techDetails']['properties']['dns']['items']:
{'type': 'object',
'title': 'dns',
'properties': {'domainname': {'type': 'string',
'title': 'Domain Name',
'description': 'The domain name (e.g. '
'ffhh, ffol)',
'pattern': '^[A-Za-z0-9äöüÄÖÜß\\.\\-\\_]{2,}$'},
'nameserver': {'type': 'array',
'title': 'Nameserver',
'description': 'Nameservers servings '
'zones of your domain',
'items': {'type': 'string',
'pattern': '^[A-Za-z0-9äöüÄÖÜß_\\-\\.:]*$'}}},
'additionalProperties': False}
in "/usr/lib/python3.14/site-packages/check_jsonschema/checker.py", line 57
>>> return self._schema_loader.get_validator(
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the schema file referenced as ../0.5.3.json and inspect techDetails.dns.items, which the check-jsonschema traceback identifies as invalid. Run the provided echo and check-jsonschema command after reviewing that schema section; done means the schema is accepted without a schema validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.