Skip to content

fix(openapi): Safely handle schemas missing 'type' field - #1967

Merged
gtema merged 1 commit into
mainfrom
codegenerator_1000983
Sep 1, 2026
Merged

fix(openapi): Safely handle schemas missing 'type' field#1967
gtema merged 1 commit into
mainfrom
codegenerator_1000983

Conversation

@gtema

@gtema gtema commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Fixes a KeyError crash in _find_schema_property when traversing
schemas that use 'oneOf' without an explicit 'type' (e.g. server
list/detail response schemas). The bare except block silently
swallowed this crash, causing api-ref description merging to fail
for affected operations and producing non-deterministic YAML output
due to Python hash-seed dependent schema ordering.

Changes are triggered by https://review.opendev.org/c/openstack/codegenerator/+/1000983

Signed-off-by: Artem Goncharov artem.goncharov@gmail.com

Fixes a KeyError crash in _find_schema_property when traversing
schemas that use 'oneOf' without an explicit 'type' (e.g. server
list/detail response schemas). The bare except block silently
swallowed this crash, causing api-ref description merging to fail
for affected operations and producing non-deterministic YAML output
due to Python hash-seed dependent schema ordering.

Changes are triggered by https://review.opendev.org/c/openstack/codegenerator/+/1000983

Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
@gtema
gtema merged commit 85705cb into main Sep 1, 2026
21 checks passed
@gtema-release-plz gtema-release-plz Bot mentioned this pull request Aug 31, 2026
@gtema
gtema deleted the codegenerator_1000983 branch September 2, 2026 11:15
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.

1 participant