This FAQ is actually a recap of questions reported by the community (you may search past and current issues labelled as "question").
Original issues are kept as links for additional details about the inquirer's use-case.
We regularly update this document based on questions asked by the community in the "issues" section of the go-swagger repository.
You may also find most recent questions on Github here. Feel free to contribute new questions and share your experience with go-swagger!
Disclaimer: some of this material might be outdated, as the project is rapidly evolving.
- Custom validation
- Non-required or nullable property?
- String parameter in body and query?
- Request response can have different objects returned based on query parameters
- How to validate dates and times?
- Accessing the return value from Default response
- How to avoid deep copies of complex data structures that need to be marshalled across the API?
- What are the dependencies required by the generated server?
- How to add custom flags?
- How do you integrate the flag sets of go-swagger and other packages, in particular, glog?
- How to serve two or more swagger specs from one server?
- How to access access API struct inside operator handler?
- Use go-swagger to generate different client or servers
- Support streaming responses
- Is there an example to generate a swagger spec document from the code?
- Extra function in example
- Maps as swagger:parameters
- How to define a swagger:response that produces a binary file?
- How to use swagger:params?
- Empty Definitions as a result?
- Documentation / Tutorials?
- Wrong schema in response structure?
- go-swagger not generating model info and showing error on swagger UI