Fix Shipping.yaml: remove tab characters and add missing array items - #255
Open
kruegge82 wants to merge 1 commit into
Open
Fix Shipping.yaml: remove tab characters and add missing array items#255kruegge82 wants to merge 1 commit into
kruegge82 wants to merge 1 commit into
Conversation
- Replace all tab characters with spaces. YAML forbids tabs for indentation; the tabs on the continuation lines of the AED/UAE description (around line 4784) and the trailing tabs after the UPS Premium Care description made the spec unparseable with standard YAML parsers (snakeyaml: "found character '\t(TAB)' that cannot start any token"). - Product_ProductIdentifier: the schema is declared as type: array but defined its object fields directly under properties. Moved the object definition into items and changed maximum: 6 to maxItems: 6 so the array constraint is expressed with the correct keyword. After these changes the spec passes openapi-generator validate with no errors.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Shipping.yamlcurrently fails to parse with standard YAML parsers and does not pass OpenAPI validation. This PR fixes two issues:1. Tab characters in the YAML
YAML forbids tab characters for indentation. The spec contained 46 lines with literal tabs; two places break parsing entirely:
Parsing with snakeyaml (used by swagger-parser and openapi-generator) fails with:
All tab characters have been replaced with spaces (the remaining occurrences were inside description texts, e.g. the Incoterms and unit-of-measurement lists).
2.
Product_ProductIdentifieris an array withoutitemsThe schema is declared as
type: arraybut defines its object fields directly underproperties. Validators report:The object definition has been moved into
items, andmaximum: 6was changed tomaxItems: 6, the correct keyword for constraining array length.Verification
openapi-generator-cli validate -i Shipping.yamlcompletes without errors after these changes (only pre-existing "unused model" recommendations remain).🤖 Generated with Claude Code