Skip to content

openapi: support additionalProperties: true/false boolean shorthand#310

Merged
intel352 merged 4 commits intomainfrom
copilot/fix-openapi-module-parsing-error
Mar 12, 2026
Merged

openapi: support additionalProperties: true/false boolean shorthand#310
intel352 merged 4 commits intomainfrom
copilot/fix-openapi-module-parsing-error

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

OpenAPI 3.0 allows additionalProperties to be either a boolean or a schema object, but the module only handled the object form — causing a YAML parse error on any spec using the boolean shorthand.

Changes

  • New openAPIAdditionalProperties union type (module/openapi.go) — wraps bool and *openAPISchema with custom UnmarshalYAML, UnmarshalJSON, and MarshalJSON to handle both forms transparently.
  • openAPISchema.AdditionalProperties changed from *openAPISchema*openAPIAdditionalProperties.
  • validateJSONBody updated to enforce all three semantics:
    • true → any extra keys permitted (no-op)
    • false → extra keys not in properties are rejected with a validation error
    • {…schema…} → extra keys validated against the given schema
components:
  schemas:
    Metadata:
      type: object
      additionalProperties: true   # previously: yaml: cannot unmarshal !!bool `true` into module.openAPISchema
Original prompt

This section details on the original issue you should resolve

<issue_title>openapi module: cannot unmarshal additionalProperties: true in OpenAPI spec</issue_title>
<issue_description>## Summary

The openapi module fails to parse valid OpenAPI 3.0 specs that use additionalProperties: true in schema definitions. The YAML unmarshaller tries to deserialize the boolean true into module.openAPISchema (a struct), causing a parse failure.

Error

openapi module "api-docs": parsing spec: yaml parse: yaml: unmarshal errors:
  line 220: cannot unmarshal !!bool `true` into module.openAPISchema

Reproduction

Any OpenAPI spec with additionalProperties: true:

components:
  schemas:
    Metadata:
      type: object
      additionalProperties: true

Expected Behavior

additionalProperties: true is valid in OpenAPI 3.0 (and JSON Schema). It means "allow any additional properties" and should be treated equivalently to additionalProperties: {}.

Workaround

Replace all additionalProperties: true with additionalProperties: {} in the spec. This is semantically identical in OpenAPI 3.0.

Root Cause

The YAML unmarshaller for the openapi module likely has a custom UnmarshalYAML for the schema type that only handles map/object forms, not the boolean shorthand.

In OpenAPI 3.0 / JSON Schema, additionalProperties can be either:

  • A boolean (true/false)
  • A Schema Object

The unmarshaller needs to handle both cases.

Environment

  • workflow v0.3.33</issue_description>

<agent_instructions>Check the OpenAPI 3.0 schema (the official definition), address this claim if correct, and check the rest of our OpenAPI implementation to ensure it conforms to the spec correctly.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix openapi module unmarshal error for additionalProperties openapi: support additionalProperties: true/false boolean shorthand Mar 12, 2026
@intel352 intel352 marked this pull request as ready for review March 12, 2026 11:50
Copilot AI review requested due to automatic review settings March 12, 2026 11:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support to the OpenAPI module’s schema parser/validator for the OpenAPI 3.0 / JSON Schema additionalProperties boolean shorthand, so specs using additionalProperties: true/false no longer fail to parse and are validated correctly at runtime.

Changes:

  • Introduces an openAPIAdditionalProperties union type with YAML/JSON unmarshalling to support both boolean and schema-object forms.
  • Updates openAPISchema.AdditionalProperties to use the new union type and extends validateJSONBody to implement true / false / schema semantics.
  • Adds unit/integration tests covering parsing and request-validation behavior for the three forms.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
module/openapi.go Adds a union type for additionalProperties and updates request-body validation logic to enforce boolean/schema semantics.
module/openapi_test.go Adds tests for YAML/JSON unmarshalling and request validation behavior for additionalProperties variants.

Comment on lines +2614 to +2623
// Valid: extra key is a string
body := `{"name":"test","extra":"string-value"}`
w := httptest.NewRecorder()
r := httptest.NewRequest(http.MethodPost, "/typed-extra", strings.NewReader(body))
r.Header.Set("Content-Type", "application/json")
h.Handle(w, r)

if w.Code == http.StatusBadRequest {
t.Errorf("expected string extra key to pass additionalProperties:{type:string}, got 400: %s", w.Body.String())
}
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The additionalProperties schema case test only covers the "valid extra" path. Adding a failing case (e.g. extra key value with the wrong type) would verify that extra keys are actually being validated against the provided schema, not just accepted.

Copilot generated this review using guidance from organization custom instructions.
@github-actions
Copy link

github-actions bot commented Mar 12, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:244: parsing iteration count: invalid syntax
baseline-bench.txt:286241: parsing iteration count: invalid syntax
baseline-bench.txt:593109: parsing iteration count: invalid syntax
baseline-bench.txt:1116682: parsing iteration count: invalid syntax
baseline-bench.txt:1425593: parsing iteration count: invalid syntax
baseline-bench.txt:1735131: parsing iteration count: invalid syntax
benchmark-results.txt:244: parsing iteration count: invalid syntax
benchmark-results.txt:309935: parsing iteration count: invalid syntax
benchmark-results.txt:619017: parsing iteration count: invalid syntax
benchmark-results.txt:883345: parsing iteration count: invalid syntax
benchmark-results.txt:1217570: parsing iteration count: invalid syntax
benchmark-results.txt:1518174: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 7763 64-Core Processor                
                            │ baseline-bench.txt │       benchmark-results.txt        │
                            │       sec/op       │    sec/op     vs base              │
InterpreterCreation-4               7.100m ± 58%   6.587m ± 55%       ~ (p=0.937 n=6)
ComponentLoad-4                     3.429m ±  0%   3.447m ±  9%  +0.52% (p=0.015 n=6)
ComponentExecute-4                  2.013µ ±  2%   1.983µ ±  2%       ~ (p=0.065 n=6)
PoolContention/workers-1-4          1.087µ ±  3%   1.084µ ±  4%       ~ (p=1.000 n=6)
PoolContention/workers-2-4          1.084µ ±  1%   1.083µ ±  3%       ~ (p=0.667 n=6)
PoolContention/workers-4-4          1.094µ ±  1%   1.089µ ±  4%       ~ (p=0.416 n=6)
PoolContention/workers-8-4          1.092µ ±  2%   1.088µ ±  7%       ~ (p=0.563 n=6)
PoolContention/workers-16-4         1.090µ ±  1%   1.085µ ±  4%       ~ (p=0.180 n=6)
ComponentLifecycle-4                3.438m ±  0%   3.457m ±  4%       ~ (p=0.065 n=6)
SourceValidation-4                  2.274µ ±  0%   2.283µ ±  0%  +0.40% (p=0.048 n=6)
RegistryConcurrent-4                765.8n ±  4%   755.4n ±  6%       ~ (p=0.485 n=6)
LoaderLoadFromString-4              3.451m ±  0%   3.480m ±  1%  +0.85% (p=0.002 n=6)
geomean                             18.45µ         18.30µ        -0.81%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               1.944Mi ± 0%   1.944Mi ± 0%       ~ (p=0.623 n=6)
ComponentLoad-4                     2.097Mi ± 0%   2.097Mi ± 0%       ~ (p=0.394 n=6)
ComponentExecute-4                  1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4         1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                2.099Mi ± 0%   2.099Mi ± 0%       ~ (p=0.942 n=6)
SourceValidation-4                  1.984Ki ± 0%   1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                1.133Ki ± 0%   1.133Ki ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4              2.099Mi ± 0%   2.099Mi ± 0%       ~ (p=0.820 n=6)
geomean                             15.05Ki        15.05Ki       +0.00%
¹ all samples are equal

                            │ baseline-bench.txt │        benchmark-results.txt        │
                            │     allocs/op      │  allocs/op   vs base                │
InterpreterCreation-4                15.09k ± 0%   15.09k ± 0%       ~ (p=1.000 n=6)
ComponentLoad-4                      17.43k ± 0%   17.43k ± 0%       ~ (p=1.000 n=6)
ComponentExecute-4                    25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4           25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                 17.48k ± 0%   17.48k ± 0%       ~ (p=1.000 n=6) ¹
SourceValidation-4                    32.00 ± 0%    32.00 ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                  2.000 ± 0%    2.000 ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4               17.47k ± 0%   17.47k ± 0%       ~ (p=1.000 n=6) ¹
geomean                               181.2         181.2       +0.00%
¹ all samples are equal

pkg: github.com/GoCodeAlone/workflow/middleware
                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │       sec/op       │    sec/op     vs base              │
CircuitBreakerDetection-4                  285.1n ± 3%   286.9n ± 17%  +0.67% (p=0.041 n=6)
CircuitBreakerExecution_Success-4          22.48n ± 1%   22.48n ±  0%       ~ (p=0.810 n=6)
CircuitBreakerExecution_Failure-4          64.22n ± 0%   65.61n ±  0%  +2.17% (p=0.002 n=6)
geomean                                    74.39n        75.09n        +0.94%

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │        B/op        │    B/op     vs base                │
CircuitBreakerDetection-4                 144.0 ± 0%     144.0 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │     allocs/op      │ allocs/op   vs base                │
CircuitBreakerDetection-4                 1.000 ± 0%     1.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
                                 │ baseline-bench.txt │       benchmark-results.txt        │
                                 │       sec/op       │    sec/op     vs base              │
JQTransform_Simple-4                     885.9n ± 27%   968.2n ± 19%       ~ (p=0.240 n=6)
JQTransform_ObjectConstruction-4         1.474µ ±  1%   1.478µ ±  2%       ~ (p=0.959 n=6)
JQTransform_ArraySelect-4                3.304µ ±  1%   3.334µ ±  2%       ~ (p=0.420 n=6)
JQTransform_Complex-4                    37.92µ ±  3%   38.56µ ±  4%  +1.70% (p=0.041 n=6)
JQTransform_Throughput-4                 1.794µ ±  1%   1.817µ ±  8%  +1.31% (p=0.006 n=6)
SSEPublishDelivery-4                     72.08n ±  1%   65.64n ±  1%  -8.94% (p=0.002 n=6)
geomean                                  1.663µ         1.673µ        +0.61%

                                 │ baseline-bench.txt │        benchmark-results.txt         │
                                 │        B/op        │     B/op      vs base                │
JQTransform_Simple-4                   1.273Ki ± 0%     1.273Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4       1.773Ki ± 0%     1.773Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4              2.625Ki ± 0%     2.625Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                  16.22Ki ± 0%     16.22Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4               1.984Ki ± 0%     1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%       0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                 +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │       benchmark-results.txt        │
                                 │     allocs/op      │ allocs/op   vs base                │
JQTransform_Simple-4                     10.00 ± 0%     10.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4         15.00 ± 0%     15.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4                30.00 ± 0%     30.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                    324.0 ± 0%     324.0 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4                 17.00 ± 0%     17.00 ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
                                    │ baseline-bench.txt │       benchmark-results.txt       │
                                    │       sec/op       │   sec/op     vs base              │
SchemaValidation_Simple-4                   1.108µ ± 12%   1.114µ ± 4%       ~ (p=0.818 n=6)
SchemaValidation_AllFields-4                1.681µ ±  3%   1.687µ ± 2%       ~ (p=0.937 n=6)
SchemaValidation_FormatValidation-4         1.608µ ±  1%   1.628µ ± 7%       ~ (p=0.126 n=6)
SchemaValidation_ManySchemas-4              1.831µ ±  2%   1.829µ ± 1%       ~ (p=0.784 n=6)
geomean                                     1.530µ         1.538µ       +0.51%

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │        B/op        │    B/op     vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │     allocs/op      │ allocs/op   vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
                                   │ baseline-bench.txt │        benchmark-results.txt        │
                                   │       sec/op       │    sec/op     vs base               │
EventStoreAppend_InMemory-4                1.214µ ± 36%   1.223µ ± 23%        ~ (p=0.818 n=6)
EventStoreAppend_SQLite-4                  1.828m ±  3%   1.285m ±  3%  -29.70% (p=0.002 n=6)
GetTimeline_InMemory/events-10-4           14.01µ ±  2%   13.86µ ±  4%        ~ (p=0.180 n=6)
GetTimeline_InMemory/events-50-4           78.01µ ±  3%   76.95µ ± 16%        ~ (p=0.065 n=6)
GetTimeline_InMemory/events-100-4          157.5µ ± 19%   124.8µ ±  1%  -20.76% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          658.8µ ±  0%   643.8µ ±  2%   -2.27% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4         1.354m ±  1%   1.324m ±  4%        ~ (p=0.132 n=6)
GetTimeline_SQLite/events-10-4             109.2µ ±  1%   109.5µ ±  6%        ~ (p=0.180 n=6)
GetTimeline_SQLite/events-50-4             253.1µ ±  1%   251.7µ ±  7%        ~ (p=0.065 n=6)
GetTimeline_SQLite/events-100-4            427.6µ ±  0%   428.9µ ±  5%        ~ (p=0.699 n=6)
GetTimeline_SQLite/events-500-4            1.833m ±  0%   1.812m ±  6%        ~ (p=0.132 n=6)
GetTimeline_SQLite/events-1000-4           3.561m ±  0%   3.536m ±  3%        ~ (p=0.394 n=6)
geomean                                    233.5µ         220.9µ         -5.40%

                                   │ baseline-bench.txt │        benchmark-results.txt         │
                                   │        B/op        │     B/op      vs base                │
EventStoreAppend_InMemory-4                  784.5 ± 7%     797.5 ± 7%       ~ (p=0.814 n=6)
EventStoreAppend_SQLite-4                  1.983Ki ± 2%   1.983Ki ± 1%       ~ (p=1.000 n=6)
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%   7.953Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%   46.62Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%   94.48Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%   472.8Ki ± 0%       ~ (p=0.545 n=6)
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%   944.3Ki ± 0%       ~ (p=0.238 n=6)
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%   16.74Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%   87.14Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%   175.4Ki ± 0%       ~ (p=1.000 n=6)
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%   846.1Ki ± 0%  -0.00% (p=0.004 n=6)
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%   1.639Mi ± 0%       ~ (p=0.346 n=6)
geomean                                    67.30Ki        67.39Ki       +0.14%
¹ all samples are equal

                                   │ baseline-bench.txt │        benchmark-results.txt        │
                                   │     allocs/op      │  allocs/op   vs base                │
EventStoreAppend_InMemory-4                  7.000 ± 0%    7.000 ± 0%       ~ (p=1.000 n=6) ¹
EventStoreAppend_SQLite-4                    53.00 ± 0%    53.00 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-10-4             125.0 ± 0%    125.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4             653.0 ± 0%    653.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4           1.306k ± 0%   1.306k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4           6.514k ± 0%   6.514k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-1000-4          13.02k ± 0%   13.02k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-10-4               382.0 ± 0%    382.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4              1.852k ± 0%   1.852k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4             3.681k ± 0%   3.681k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-500-4             18.54k ± 0%   18.54k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-1000-4            37.29k ± 0%   37.29k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                     1.162k        1.162k       +0.00%
¹ all samples are equal

Benchmarks run with go test -bench=. -benchmem -count=6.
Regressions ≥ 20% are flagged. Results compared via benchstat.

@intel352
Copy link
Contributor

@copilot apply changes based on the comments in this thread

And fix the failing linter

- Add bodyLabel prefix to additionalProperties:false error messages
- Strengthen AdditionalProperties_True assertion to check for 200 (not just non-400)
- Add invalid-type failing case to AdditionalProperties_Schema test
- Fix gocritic ifElseChain lint issue in pipeline_step_graphql.go (from main)

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 12, 2026

@copilot apply changes based on the comments in this thread

And fix the failing linter

All three review items are addressed in commit 9bb5c4f:

  • additionalProperties: false error messages now include bodyLabel prefix for consistency with other validation errors
  • AdditionalProperties_True test now asserts w.Code != http.StatusOK instead of == 400
  • AdditionalProperties_Schema test now includes a failing case (extra key with integer value where type: string is required) to verify schema validation is actually enforced

The gocritic ifElseChain lint failure in pipeline_step_graphql.go (a file added to main after this branch was created) is also fixed by rewriting the if-else as a switch statement.

@intel352 intel352 merged commit 4d55000 into main Mar 12, 2026
11 checks passed
@intel352 intel352 deleted the copilot/fix-openapi-module-parsing-error branch March 12, 2026 15:38
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.

openapi module: cannot unmarshal additionalProperties: true in OpenAPI spec

3 participants