Open
Conversation
Add full support for diffing OpenAPI 3.1 documents including: Document level: - WebhooksDiff for OpenAPI 3.1 webhooks - JSONSchemaDialectDiff for JSON Schema dialect specification Info object: - SummaryDiff for Info.Summary field License object: - IdentifierDiff for SPDX license identifiers Schema object (JSON Schema 2020-12): - ConstDiff for const keyword - ExamplesDiff for examples array - PrefixItemsDiff for tuple validation - ContainsDiff, MinContainsDiff, MaxContainsDiff for array containment - PatternPropertiesDiff for pattern-based properties - DependentSchemasDiff for conditional schemas - PropertyNamesDiff for property name validation - UnevaluatedItemsDiff, UnevaluatedPropertiesDiff Closes #52 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
92992de to
95dce83
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #791 +/- ##
==========================================
- Coverage 89.55% 87.14% -2.41%
==========================================
Files 239 262 +23
Lines 12154 14057 +1903
==========================================
+ Hits 10884 12250 +1366
- Misses 840 1257 +417
- Partials 430 550 +120
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add comprehensive tests for webhooks and new OpenAPI 3.1 / JSON Schema 2020-12 fields: - Webhook add/delete/modify tests - JSONSchemaDialect diff tests - Info.Summary diff tests - License.Identifier diff tests - Schema fields: const, examples, prefixItems, contains, minContains, maxContains, patternProperties, dependentSchemas, propertyNames, unevaluatedItems, unevaluatedProperties Coverage improvements: - webhooks_diff.go: 87.5-100% - schema_diff.go: 86.4-100% - info_diff.go: 81.2-100% - license_diff.go: 83.3-94.1% Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add additional tests for webhook diff functionality: - Test Empty() with populated but empty diff struct - Test webhooks only in base spec (deletion case) - Test webhooks only in revision spec (addition case) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
OpenAPI 3.1 changed exclusiveMinimum/exclusiveMaximum from boolean modifiers to numeric bound values. Updated oasdiff to work with the new ExclusiveBound type from kin-openapi that supports both formats. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add score property with exclusive bounds to Order schema in test data - Add test for ExclusiveMinDiff/ExclusiveMaxDiff with numeric values - Fix exclusiveBoundToValue to extract actual values from ExclusiveBound struct Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The docker/metadata-action automatically converts slashes to dashes, so use its output for feature branch builds to avoid invalid tag errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
a9484af to
d6f8063
Compare
Update replace directive to oasdiff/kin-openapi@1da4078 which includes: - JSON Schema 2020-12 identity keywords ($id, $anchor, $dynamicRef, $dynamicAnchor) - Content vocabulary (contentMediaType, contentEncoding, contentSchema) - Discriminator support for anyOf - jsonSchemaDialect validation - mutualTLS security scheme - License url/identifier mutual exclusivity - Paths optional in 3.1 - JSON Schema 2020-12 validation in openapi3filter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Support diffing if/then/else, dependentRequired, $id, $anchor, $dynamicRef, $dynamicAnchor, contentMediaType, contentEncoding, and contentSchema fields added in kin-openapi's OpenAPI 3.1 support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…omment Update kin-openapi dependency to latest OpenAPI 3.1 fixes (da004e9) which adds $defs, $schema, and $comment keywords. Add corresponding diff fields and tests in oasdiff. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add checker rules for const field changes, webhook add/remove, and nullable type arrays (OpenAPI 3.1 style). Includes localized messages for en, es, pt-br, and ru. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: add OpenAPI 3.1 breaking change checker rules
Add comprehensive documentation to package doc.go files: - checker: breaking change detection overview, configuration, rules - checker/generator: message generation from YAML - checker/localizations: localized message templates - diff: OpenAPI diff calculation, schema comparison - flatten/*: allof merging, common params, header normalization - formatters: output formats (json, yaml, html, junit, etc.) - load: spec loading from files, URLs, globs with preprocessing - report: legacy basic changelog (predates richer changelog) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Document Level
Info Object
Info.Summaryfield (new in OpenAPI 3.1)License Object
Schema Object (JSON Schema 2020-12)
ConstDiffExamplesDiffPrefixItemsDiffContainsDiffMinContainsDiffMaxContainsDiffPatternPropertiesDiffDependentSchemasDiffPropertyNamesDiffUnevaluatedItemsDiffUnevaluatedPropertiesDiffIfDiffifsub-schemaThenDiffthensub-schemaElseDiffelsesub-schemaDependentRequiredDiffSchemaIDDiff$idkeywordAnchorDiff$anchorkeywordDynamicRefDiff$dynamicRefkeywordDynamicAnchorDiff$dynamicAnchorkeywordContentMediaTypeDiffContentEncodingDiffContentSchemaDiffDefsDiff$defsschema definitionsSchemaDialectDiff$schemadialect keywordCommentDiff$commentkeywordDependencies
This PR uses a
replacedirective ingo.modto pointgithub.com/getkin/kin-openapito theoasdiff/kin-openapifork, which includes OpenAPI 3.1 support (getkin/kin-openapi#1125). Thereplacedirective can be removed once that PR is merged and a new kin-openapi release is published.Test plan
go build ./...passesgo test ./...passes (all 14 packages)🤖 Generated with Claude Code