Skip to content

Conversation

@lovisaberggren
Copy link
Collaborator

@lovisaberggren lovisaberggren commented Mar 28, 2025

Proposed changes

Adds two rules to partially validate IPA 117:

API producers must provide a well-defined schema or example(s)

  • xgen-IPA-117-parameter-has-examples-or-schema corresponds to the legacy spectral rule
  • xgen-IPA-117-objects-must-be-well-defined checks that components of type: 'object' has schema, example(s), properties, additionalProperties or oneOf/anyOf/allOf

See README additions for more details.

Jira ticket: CLOUDP-306572

@lovisaberggren lovisaberggren marked this pull request as ready for review March 28, 2025 17:10
@lovisaberggren lovisaberggren requested a review from a team as a code owner March 28, 2025 17:10
function checkViolationsAndReturnErrors(object, path) {
try {
const validProperties = [
'schema',
Copy link
Collaborator

Choose a reason for hiding this comment

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

q: we can add format, pattern, allowedValues, min, max? Wdyt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since we're only validating type: 'object' these wouldn't be valid/bring clarification on what the object looks like. These keywords are for primitive types

@lovisaberggren lovisaberggren merged commit 1caa9fb into main Mar 28, 2025
8 checks passed
@lovisaberggren lovisaberggren deleted the CLOUDP-306572 branch March 28, 2025 17:55
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.

2 participants