You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A value containing "/" was substituted into the path as is, so
GetProduct (productId:'N B/x') requested /products/N%20B/x, a different
route. Each value now goes through HttpCommand.UrlEncode and stays in its
own segment: /products/N%20B%2Fx.
The style and explode of query parameters were ignored, and arrays were
handed to HttpCommand.UrlEncode as they were. For Open-Meteo, whose hourly,
daily and current parameters are explode: false,
GetV1Forecast (latitude:… ⋄ longitude:… ⋄ hourly:,⊂'temperature_2m')
failed with LENGTH ERROR in UrlEncode. Such parameters are now joined by
utils.joinArray with the delimiter for their style (',' form,
' ' spaceDelimited, '|' pipeDelimited): hourly=temperature_2m%2Crain.
Also add the missing '/' between name and version in the User-Agent, and
document path parameter encoding.
The CLI documents that generation proceeds even if the spec contains
errors, but the run still failed whenever the reader reported one, such as
an "example" on a Response Object. With --no-validation, any document the
reader produced is now used, and its errors are logged as warnings.
Generated docs:
- Fix the README's API reference, which was wrapped in a Scriban escape
block and rendered as raw template code, and its empty models list
- Turn per-tag docs/<tag>.md generation back on. Files are named by the
tag's APL name (its Client field), so a tag cannot escape docs/ and
tags that share a Client field share a page
- Give each operation an anchor that its link targets, a runnable usage
example, and parameter, request body and response tables
- Build the docs in DocsBuilder from naming rules shared with endpoint
generation (OperationNaming), so they document the names the
generated functions read
Endpoints:
- Read path-item parameters, not only operation parameters
- Read parameters whose names are not valid APL (X-Trace, page[size])
under their mangled names, and send them under the original ones
- Accept model instances as JSON bodies (they were sent as "")
- Send a JSON body with no model (a string, say) as "body"
Models:
- Fix the required-field check for a model with one required field,
which always failed
- Treat nullable arrays as arrays
- Leave read-only properties out of FormatNS
- Emit enum constants as typed, escaped literals with distinct names
- Keep numeric arrays flat, and JSON null as null, in FormatNS
- Give map types a niladic constructor and FromResponse
Add a Models page, and update the generated client and contributor docs
for generated docs/<tag>.md pages, model classes, request body naming,
mangled parameter names and the new utils functions.
Inherited properties are marked required only from the allOf sub-schema passed to AddProperty. A required entry on the outer schema that names an inherited property is valid, but it is ignored here, so the generated constructor accepts a model missing that required field. Compute requiredness from both the outer schema and the declaring sub-schema when flattening.
Numeric vectors are treated as a single scalar value here because a simple numeric vector has depth 1. For a default form array with explode: true, values such as 1 2 therefore become one ids=1%202 pair instead of ids=1&ids=2. Keep character vectors scalar, but expand simple numeric vectors into repeated pairs.
- Number an inline model whose name a component model already takes, and
document the name it was given
- Warn when component schemas map to the same model class
- Resolve allOf references in inline models
- Treat an inherited property as required if the outer schema says so
- Send a numeric vector query parameter as one pair per item
- Detect macOS in install.sh, and reject unsupported platforms
Recursively flatten allOf schemas in documentation examples
src/OpenAPIDyalog/Utils/DocsBuilder.cs:375
The documentation flattener also stops after one allOf level. For multi-level inheritance, generated usage examples omit inherited fields (including required ones), so the examples no longer describe the generated request shape. Reuse a recursive, cycle-safe schema traversal shared with model generation.
- Resolve a request body's $ref before classifying it: a reference to an
array of models is a vector of them, and anything else is sent as given
- Generate model classes only for object schemas
- Flatten allOf to any depth, in models and docs, via SchemaHelpers
- Stop generation when two schema names make the same model class
- Give enum constants distinct names when property names differ only
in punctuation
JsonSchemaType is a flags enum. A nullable array has a value such as Array | Null, so this equality fails and an explode: false parameter is sent as repeated query keys instead of one delimited value. Use the same null-stripping array test as OperationNaming.IsType.
Nullable enum schemas can explicitly include JSON null, but null enum entries are discarded before rendering while this setter requires every assigned value to be present in the remaining constants. Assigning ⊂'null' is then rejected even though the schema allows it. Preserve whether the enum contains null and allow that representation in the generated setter.
This issue also appears on line 111 of the same file.
- Treat an object schema with no properties as a map of arbitrary keys
- Follow $ref chains between components, stopping at a cycle
- Join nullable array query parameters that have explode: false
- Let nullable enums accept null, and skip the JSON null sentinel
- Accept and send a model property that holds one nested model or
namespace, and recognise it as present when required
Primitive allOf schemas are misclassified as object models
src/OpenAPIDyalog/Utils/SchemaHelpers.cs:37
Treating every schema with allOf as an object misclassifies valid primitive compositions such as { "allOf": [{ "type": "string" }] }. Such a component will get an empty model class, and references to it will be handled as namespaces instead of strings. Determine objectness from the schema or resolved allOf members actually describing objects rather than from allOf being non-empty.
- Store model property values in a private namespace, by JSON name, and
append _ to a property named like a member the class defines
- Write control characters in APL string literals as ⎕UCS codes
- Treat an allOf as an object only if one of its members is
- Correct the docs for free-form inline request bodies
For an optional JSON request body, the absent branch leaves body as the initial empty namespace, while clientArgs still always includes Params: body and the JSON content type. HttpCommand therefore sends {} instead of omitting the body, which is observably different for APIs where no body and an empty object have different meanings. Track whether the argument was supplied and only add Params/ContentType when it is present (while retaining the required-body error).
Preserve additional properties in hybrid object schemas
src/OpenAPIDyalog/Utils/SchemaHelpers.cs:71
This only treats property-less objects as maps. An object with declared properties still permits additional properties by default (or may explicitly define additionalProperties), but the regular model template copies only Properties; extra constructor keys are silently discarded by FormatNS. Preserve additional entries alongside the declared fields so hybrid object/map schemas can round-trip valid payloads.
- Stop generation when two operations make the same function
- Leave out an optional body that is not given, with no Content-Type
- Keep and send model properties beyond those declared, unless forbidden
- Write numbers in URLs as JSON (-0.12, not ¯0.12) at full precision
- Accept config.headers as pairs, a flat list or a matrix (pairs failed)
- Send operations that accept only unsupported auth (OAuth) as they are,
so credentials can go in config.headers; fix basic auth lookup
- Make path parameters match the path's {placeholders}
- Fail clearly for a multipart field whose name is not valid APL
- README: base URL from path-level servers, mark a relative one, show
the first GET as the example, link to dyalog-labs
- Docs: show oneOf/anyOf fields by their first alternative
The fallback does not guarantee unique constant names for valid mixed-type JSON Schema enums. For example, enum: ["1", 1] initially maps both values to ⍙1, and this fallback maps both raw ApiValue strings to ⍙1 again. The generated enum namespace then has duplicate fields (or loses one value), so the setter cannot accept every declared value. After fallback, detect remaining collisions and disambiguate by JSON type or a stable suffix.
- Send a required request body even when none of its fields are given
- Number enum constants whose values are the same text but different
JSON types ("1" and 1)
Nullable model references expressed in OpenAPI 3.1 as anyOf: [$ref, null] are missed here because the outer schema has no reference ID. Such a property is emitted as a plain value, so FormatNS copies a model class instance into the JSON namespace instead of invoking its FormatNS, and ⎕JSON cannot serialize it. Resolve a union's single non-null alternative before classifying references/arrays and nullable state.
Check optional multipart body presence before required fields
An optional multipart body cannot actually be omitted when its schema has required fields. With no form arguments, each required field takes the Else branch below and signals before hasBody is checked, even though requestBody.required is false. Detect whether the optional body is present first; only enforce schema-required form fields after at least one body field is supplied.
Typed map models do not recursively format model values. For additionalProperties: { $ref: ... }, FormatNS returns _data unchanged, leaving any generated model instances inside the namespace; the request formatter explicitly relies on FormatNS because ⎕JSON cannot serialize class instances. Preserve the additional-properties schema in the context and convert model values (including vectors) before returning the map namespace.
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
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
docs/tag.md.scriban), slimmer README templateexplode: falsearray query parameters as one delimited value--no-validationproceed past reader errors