bug2942

package
v0.36.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package bug2942 reproduces go-swagger issue #2942 ("how can i generate spec with a simple string response"). Two paths to a primitive response body:

  • a swagger:route response line using the unambiguous `body:` tag (`200: body:string`); and
  • a swagger:response whose Body field is a primitive (`Body string`).

The bare/untagged form (`200: string`) is intentionally NOT supported — an untagged token is a response/model NAME, and reading it as a type would make the syntax ambiguous; authors are pointed at the `body:` form by diagnostic.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL