Skip to content

fix: serialize a boolean schema example value as a JsonNode#5173

Merged
daniel-kmiecik merged 1 commit into
swagger-api:masterfrom
Mattias-Sehlstedt:boolean-schema-serialization
May 8, 2026
Merged

fix: serialize a boolean schema example value as a JsonNode#5173
daniel-kmiecik merged 1 commit into
swagger-api:masterfrom
Mattias-Sehlstedt:boolean-schema-serialization

Conversation

@Mattias-Sehlstedt
Copy link
Copy Markdown
Contributor

Pull Request

Thank you for contributing to swagger-core!

Please fill out the following information to help us review your PR efficiently.


Description

Fixes so that a boolean example value is serialized as a JsonNode rather than as a string (true vs "true"). This makes it so that the example in the json/yaml aligns with the type of the field.

Fixes: #5168

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor (non-breaking change)
  • 🧪 Tests
  • 📝 Documentation
  • 🧹 Chore (build or tooling)

Checklist

  • I have added/updated tests as needed
  • I have added/updated documentation where applicable
  • The PR title is descriptive
  • The code builds and passes tests locally
  • I have linked related issues (if any)

Screenshots / Additional Context

@ewaostrowska ewaostrowska added the backlog label May 7, 2026 — with Claude
@daniel-kmiecik
Copy link
Copy Markdown
Collaborator

@Mattias-Sehlstedt fix looks good. Thanks again for your contribution!

@daniel-kmiecik daniel-kmiecik merged commit 5239cae into swagger-api:master May 8, 2026
7 checks passed
@Mattias-Sehlstedt Mattias-Sehlstedt deleted the boolean-schema-serialization branch May 8, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Boolean example values are still serialized as strings (regression follow-up to #5061 / PR #5062)

3 participants