diff --git a/changelog.md b/changelog.md index a6a2094..60f6d00 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- BoxLang `$ref` parse hangs / bad absolute paths: depend on `swagger-sdk` with cycle-safe walks, absolute path resolution, and no `isStruct(cfc)` on nested parsers (see coldbox-modules/swagger-sdk). +- BoxLang: treat `arrayContainsNoCase` as boolean in `OpenAPIConstraintsGenerator` (do not compare with `> 0`; BoxLang evaluates `false > 0` as true). + ## [3.1.3] - 2025-10-29 ## [3.1.2] - 2024-09-24 diff --git a/models/OpenAPIConstraintsGenerator.cfc b/models/OpenAPIConstraintsGenerator.cfc index d54d1dd..c3ecf23 100644 --- a/models/OpenAPIConstraintsGenerator.cfc +++ b/models/OpenAPIConstraintsGenerator.cfc @@ -58,7 +58,8 @@ component name="OpenAPIConstraintsGenerator" { return arguments.properties.map( ( fieldName, schema ) => { return generateConstraint( schema = schema, - isRequired = arrayContainsNoCase( requiredFields, fieldName ) > 0 + // BoxLang returns boolean; `false > 0` is true there — use truthiness only + isRequired = arrayContainsNoCase( requiredFields, fieldName ) ); } ); }