Conversation
… consolidating snippets
…lityMatcher for numeric comparisons
…eplacing multi-value map with explicit key-value addition
Test Results45 tests 45 ✅ 9s ⏱️ Results for commit 4c7e15a. |
Code Coverage Report
Files
|
There was a problem hiding this comment.
Pull request overview
This PR updates Documentify’s core behavior and tests to improve compatibility with newer Spring Boot / Spring versions by making schema naming deterministic, improving date sample serialization, and relaxing numeric equality matching during JSONPath validation.
Changes:
- Bump project version to
1.4.1. - Serialize
LocalDate/LocalDateTimesamples as ISO strings without surrounding quotes (via a configured sharedObjectMapper). - Replace strict
equalToObject-style value assertions with matcher-based equality that treats numeric types (Int/Long/BigDecimal/Double) as numerically equivalent, with added tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| gradle.properties | Bumps library version to 1.4.1. |
| documentify-project/documentify-core/src/test/kotlin/io/github/bgmsound/documentify/core/FieldTest.kt | Adds coverage for ISO date/time sample formatting behavior. |
| documentify-project/documentify-core/src/test/kotlin/io/github/bgmsound/documentify/core/DocumentResultTest.kt | Adds coverage for numeric vs non-numeric matcher equality behavior. |
| documentify-project/documentify-core/src/main/kotlin/io/github/bgmsound/documentify/core/specification/schema/ResourceSpec.kt | Makes request/response schema titles deterministic (removes random suffix usage). |
| documentify-project/documentify-core/src/main/kotlin/io/github/bgmsound/documentify/core/specification/FieldSchema.kt | Makes optionalField(description) return Field (consistent with other DSL helpers). |
| documentify-project/documentify-core/src/main/kotlin/io/github/bgmsound/documentify/core/specification/element/SpecElement.kt | Introduces shared ObjectMapper configured for ISO date/time serialization; strips quotes for date samples. |
| documentify-project/documentify-core/src/main/kotlin/io/github/bgmsound/documentify/core/specification/element/header/Header.kt | Reorders newHeader parameters (description before sample). |
| documentify-project/documentify-core/src/main/kotlin/io/github/bgmsound/documentify/core/emitter/WebTestClientDocumentResult.kt | Removes now-unneeded expectValue override after matcher-based validation change. |
| documentify-project/documentify-core/src/main/kotlin/io/github/bgmsound/documentify/core/emitter/WebTestClientDocumentEmitter.kt | Adjusts request header application and ensures alternative response docs include both response snippets and resource snippet. |
| documentify-project/documentify-core/src/main/kotlin/io/github/bgmsound/documentify/core/emitter/AbstractDocumentResult.kt | Centralizes JSONPath validation into matcher-based logic; adds numeric-equality matcher. |
| documentify-project/documentify-core/src/main/kotlin/io/github/bgmsound/documentify/core/AbstractDocumentifySupport.kt | Removes an empty companion object. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
24
to
28
| init { | ||
| summary = "" | ||
| val randomSuffix = randomSuffix() | ||
| request.schema = "$documentName Request ($randomSuffix)" | ||
| response.schema = "$documentName Response ($randomSuffix)" | ||
| request.schema = "$documentName Request" | ||
| response.schema = "$documentName Response" | ||
| } |
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.
No description provided.