Skip to content

fix: make travel auction oneOf schemas mutually exclusive - #211

Closed
anonvt wants to merge 1 commit into
mainfrom
fix/travel-oneof
Closed

anonvt wants to merge 1 commit into
mainfrom
fix/travel-oneof

Conversation

@anonvt

@anonvt anonvt commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Clears the four no-illogical-composition-keywords Redocly errors that have failed the lint check on main and on every PR since the travel schemas landed. Spec-only; no change to auction-engine or central-services. Ticket: INTE-1541.

Changes (topsort-api-v2.yml)

  • TravelAuctionResult: add a resultType discriminator mapping hotels, flights and empty to their result schemas, mirroring the existing AuctionResult block, which passes the same rule for the same reason.
  • HotelsAuctionRequest / FlightsAuctionRequest: add type to required.

Why this matches the engine

  • Auction-engine's getTravelAdType returns an error for any type other than hotels or flights, so a missing type is already rejected. Requiring it in the spec describes current behavior.
  • api_travel_auctions.go sets resultType to the request's type, so the discriminator values are what the engine returns today.

Validation

redocly lint --extends recommended-strict is clean for the first time ("Your API description is valid"). prettier --check, yamllint, typos and vacuum lint (0 errors) pass.

🤖 Generated with Claude Code

Add a resultType discriminator to TravelAuctionResult, mirroring
AuctionResult, and require type on the hotels and flights requests.
Both describe current auction-engine behavior: a missing or unknown
type is rejected, and resultType echoes the request type. Clears the
four Redocly no-illogical-composition-keywords errors on main.

INTE-1541

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@anonvt
anonvt requested a review from a team as a code owner October 13, 2026 19:14
@anonvt
anonvt enabled auto-merge (squash) October 13, 2026 19:22
@anonvt

anonvt commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #207, which fixes the same Redocly findings more thoroughly (own hotels result schema, constrained resultType, empty result dropped from the travel oneOf).

@anonvt anonvt closed this Oct 13, 2026
auto-merge was automatically disabled October 13, 2026 19:29

Pull request was closed

@anonvt
anonvt deleted the fix/travel-oneof branch October 13, 2026 19:29
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