Repository navigation
Try-it: send requests in their declared shape, plus conveniences - #5
Merged
Merged
Conversation
The console now serializes parameters by their OpenAPI style and explode (label/matrix paths; spaceDelimited, pipeDelimited and deepObject queries; objects typed as JSON), offers an Accept select when the 2XX responses name more than one media type, sends a binary body as the chosen file itself, and turns server variables into fields. Sample.Shared gains one widget operation per shape - search, compare, export, datasheet and availability - with API-key and Basic auth beside the bearer token, and the browser tests now drive those operations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The console gains extra request headers (sent last, so they can override
the panel's own), a variant picker for oneOf/anyOf bodies that puts the
discriminator first, warn-only checks on parameter values, a deprecation
note, and Copy as fetch beside Copy as cURL.
Sample.Shared gains a polymorphic promotions body, a deprecated lookup,
constrained search parameters and an ETag on GET /widgets/{id}, each
driven by a browser test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Rounds out the try-it console in
Hlibz.Redoc.AspNetCore, and makes the shared sample exercise everything it can send.Requests that went out wrong
style/explode—labelandmatrixin the path;spaceDelimited,pipeDelimitedanddeepObjectin the query. An object parameter is typed as JSON and refused before sending if it isn't.format: binaryschema, or a non-text media type with no schema, gets one file picker and sends theFileitself. A wildcard type likeimage/*takes the file's ownContent-Type.{variable}gets a field, or a select for anenum, starting at its default.Conveniences
oneOf/anyOfbodies (ASP.NET Core's[JsonDerivedType]), with the discriminator first, because System.Text.Json reads it from the first property only.enum, length,pattern, range, item count and a few formats. They never block Send.Sample and tests
Sample.Sharedgains one widget operation per feature: search, compare, export (API key), datasheet (Basic), availability (server variable), promotions (polymorphic) and a deprecated lookup.GET /widgets/{id}now sends an ETag. The browser tests drive these same operations instead of test-only copies; only the redirect case is still test-only.Testing
Sample.Own. That check caught three things the tests didn't: warnings drawn as solid bars because of a class-name clash, action buttons breaking their labels in a narrow panel, and a default promotion body the server rejected.x-hideTryItPanel.🤖 Generated with Claude Code