Skip to content

feat(validation): add YAML parser conformance warning - #353

Merged
hdamker merged 2 commits into
camaraproject:mainfrom
hdamker:feat/yaml-parser-conformance-check
Jun 26, 2026
Merged

feat(validation): add YAML parser conformance warning#353
hdamker merged 2 commits into
camaraproject:mainfrom
hdamker:feat/yaml-parser-conformance-check

Conversation

@hdamker

@hdamker hdamker commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

enhancement/feature
tests
documentation

What this PR does / why we need it:

Adds an API-scoped Python Validation check that parses each OpenAPI YAML
definition with js-yaml@5. Parser failures are reported as advisory P-037
warnings with the first parser line and column, while helper execution failures
remain error-level infrastructure findings.

The PR also adds rule metadata, unit tests for the Node helper and Python
check, and FAQ guidance for maintainers who see P-037 even though yamllint or
Spectral accepted the same file.

Local validation with this branch reports P-037 warnings at the known
subscription YAML locations in:

  • ConnectedNetworkType
  • DeviceReachabilityStatus
  • DeviceRoamingStatus

Which issue(s) this PR fixes:

Fixes #352

Special notes for reviewers:

Local checks run:

  • python3 -m pytest validation/tests/test_yaml_parser_conformance.py -q
  • python3 -m pytest validation/tests/test_rule_metadata_integrity.py -q
  • python3 -m pytest validation/tests -q

Changelog input

release-note
Adds an advisory validation warning for OpenAPI YAML files rejected by stricter YAML parsers.

Additional documentation

docs
documentation/validation/faq.md adds guidance for P-037.

@hdamker
hdamker requested review from Kevsy and rartych as code owners June 22, 2026 06:12
Kevsy
Kevsy previously approved these changes Jun 22, 2026

@Kevsy Kevsy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hdamker

hdamker commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@Kevsy @rartych this PR is independent from the scope extension discussed within the issue. It is necessary to ensure the compliance with js-yaml@5 and raise a warning for APIs which don't have it.

@rartych rartych left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kevsy Kevsy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hdamker
hdamker merged commit 96538b4 into camaraproject:main Jun 26, 2026
8 checks passed
@hdamker
hdamker deleted the feat/yaml-parser-conformance-check branch June 26, 2026 11:02
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

Successfully merging this pull request may close these issues.

Consider a narrow YAML parser-compatibility check for js-yaml 5 failures

3 participants