Skip to content

feat: the xml object, how a schema is written as XML - #34

Merged
MarkRosemaker merged 1 commit into
masterfrom
feat/schema-xml
Nov 27, 2026
Merged

MarkRosemaker merged 1 commit into
masterfrom
feat/schema-xml

Conversation

@MarkRosemaker

Copy link
Copy Markdown
Owner

This adds OpenAPI's XML object as Schema.XML. It records how a schema is written as XML:

  • the element or attribute name;
  • the namespace and prefix;
  • whether it is an attribute;
  • whether a list is wrapped in an element of its own.

Until now, a document with an xml member failed to load, because unknown members are rejected. Validate requires the namespace to be an absolute URI.

This is the first step toward XML responses in the go-api-libs pipeline, for go-api-libs/ibkr-flex: IBKR's Flex Web Service answers in text/xml. openapi-enrich will infer these schemas from recorded XML bodies, and openapi-codegen will generate xml-tagged structs from them.

TestXML round-trips a schema with a named, namespaced and prefixed element, an attribute and a wrapped list. TestXML_RelativeNamespace checks that a relative namespace is rejected.

make ready passes.


Generated by Claude Code

A schema can now say how it is written as XML: the name of its element
or attribute, its namespace and prefix, whether it is an attribute, and
whether a list is wrapped in an element of its own. Until now a
document with one failed to load, as an unknown member. A namespace
must be an absolute URI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
@MarkRosemaker
MarkRosemaker merged commit 78507e6 into master Nov 27, 2026
1 check passed
@MarkRosemaker
MarkRosemaker deleted the feat/schema-xml branch November 27, 2026 15:50
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.

2 participants