You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-per-operation registration reflects through a temporary `spec.Router`, then merges the generated document into the collector
160
161
161
162
Four lock points: `Register`, `RegisterDSLOperation`, `injectRecordedResponseSchema`, `appendExamplesLocked`.
162
163
@@ -226,15 +227,15 @@ See `examples/parallel` for a working end-to-end example using schema inference
226
227
### DSL path (recommended)
227
228
228
229
1.`Path` / `Get` / `Response` / `RequestBody` / `ResponseSchema` declare metadata during tree construction.
229
-
2.`flushPendingDSLOps` (first `RunTest`) calls `RegisterDSLOperation` which drives the `openapi3.Reflector` directly.
230
-
3.`injectInferredRequestSchema` is **skipped** if the reflector already placed a schema for any content-type key in `requestBody.content` — preventing conflict when `Consumes` and `SetRawBody` use different content-type strings.
230
+
2.`flushPendingDSLOps` (first `RunTest`) calls `RegisterDSLOperation`, which reflects a temporary `oaswrap/spec` route and merges the generated operation into the collector document.
231
+
3.`injectInferredRequestSchema` is **skipped** if registration already placed a schema for any content-type key in `requestBody.content` — preventing conflict when `Consumes` and `SetRawBody` use different content-type strings.
231
232
232
233
### Runtime-only path (no DSL)
233
234
234
235
For tests that use `requestBuilder` directly (or through the legacy `Register` codepath):
235
236
236
237
1.`Register` is called with the builder and recorded response.
237
-
2.`AddReqStructure` / `AddRespStructure` drive the reflector from the builder's typed fields.
238
+
2.`option.Request` / `option.Response` drive `oaswrap/spec` reflection from the builder's typed fields.
238
239
3.`injectInferredRequestSchema` fills any gaps from actual request bytes.
239
240
4.`injectInferredSchema` fills response schema from actual response bytes when none was declared.
0 commit comments