Skip to content

check for duplicate properties, names, ... in 'lint' - #1779

Merged
jschoedl merged 14 commits into
datacontract:mainfrom
gkoenig:feat/lint-fail-on-duplicates
Nov 6, 2026
Merged

jschoedl merged 14 commits into
datacontract:mainfrom
gkoenig:feat/lint-fail-on-duplicates

Conversation

@gkoenig

@gkoenig gkoenig commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
  • Tests pass (uv run pytest)
  • Code formatted (uv run ruff check --fix && uv run ruff format)
  • Docs updated (if relevant)
  • CHANGELOG.md entry added

@jschoedl jschoedl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @gkoenig, thank you for the PR!

Comment thread datacontract/lint/constraints.py Resolved
Comment thread datacontract/lint/constraints.py Resolved
Comment thread datacontract/data_contract.py Resolved
Comment thread datacontract/lint/resolve.py Resolved
@jschoedl jschoedl linked an issue Nov 4, 2026 that may be closed by this pull request
@gkoenig

gkoenig commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Hi @jschoedl ,

many thanks for your review and your comments.....always happy to support where I can.
I fixed the individual parts.....and we are ready "try again" 🤞

gkoenig and others added 4 commits November 5, 2026 11:12
A contract can list the same SLA property on the same element, as the ODCS SLA example does with timeOfAvailability. A repeated SLA id still fails validation.
An id inside a custom property value, property examples, or quality arguments or implementation is the user's own data, so repeating it no longer fails the contract.
@jschoedl

jschoedl commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks, this looks good now! I pushed two small follow-ups that I (i.e. Claude ;) found:

  • SLA entries are no longer checked, because ODCS allows repeating a property on the same element (example)
  • ids inside free-form values such as a custom property's value or examples are ignored

@jschoedl
jschoedl merged commit c66554a into datacontract:main Nov 6, 2026
18 checks passed
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.

enhancement: datacontract lint => semantic linting

2 participants