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

fix(ibm-use-date-based-format): handle null example values #724

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

dpopp07
Copy link
Member

@dpopp07 dpopp07 commented Feb 4, 2025

Previously, if the example value given for a property was an explicit 'null', this rule would crash the validator.

This commit filters null examples from the logic so that they won't cause any trouble.

Previously, if the example value given for a property was an explicit
'null', this rule would crash the validator.

This commit filters null examples from the logic so that they won't
cause any trouble.

Signed-off-by: Dustin Popp <dpopp07@gmail.com>
@dpopp07 dpopp07 requested a review from padamstx February 4, 2025 20:33
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

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

LGTM

@dpopp07 dpopp07 merged commit 44f6155 into dp/valid-schema-example Feb 4, 2025
7 checks passed
@dpopp07 dpopp07 deleted the dp/handle-null-examples branch February 4, 2025 20:38
dpopp07 added a commit that referenced this pull request Feb 4, 2025
Previously, if the example value given for a property was an explicit
'null', this rule would crash the validator.

This commit filters null examples from the logic so that they won't
cause any trouble.

Signed-off-by: Dustin Popp <dpopp07@gmail.com>
ibm-devx-sdk pushed a commit that referenced this pull request Feb 4, 2025
# @ibm-cloud/openapi-ruleset [1.29.0](/~https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.28.4...@ibm-cloud/openapi-ruleset@1.29.0) (2025-02-04)

### Bug Fixes

* **ibm-use-date-based-format:** avoid false positives for mac addresses ([#723](#723)) ([357dfb2](357dfb2))
* **ibm-use-date-based-format:** handle null example values ([#724](#724)) ([e096b12](e096b12))

### Features

* **ibm-valid-schema-example:** introduce new validation rule ([d2f8071](d2f8071))
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