github.com/kaisawind/go-swagger@v0.19.0/docs/faq/README.md (about)

     1  # FAQ
     2  
     3  This FAQ is actually a recap of questions reported by the community
     4  (you may search [past and current issues labelled as "question"](https://github.com/go-swagger/go-swagger/issues?q=is%3Aissue+label%3Aquestion)).
     5  
     6  Original issues are kept as links for additional details about the inquirer's use-case.
     7  
     8  >*We regularly update this document based on questions asked by the community in the "issues" section of the go-swagger repository.*
     9  
    10  You may also find most recent questions on Github [here](https://github.com/go-swagger/go-swagger/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aquestion).
    11  Feel free to contribute new questions and share your experience with go-swagger!
    12  
    13  **Disclaimer**: some of this material might be outdated, as the project is rapidly evolving.
    14  
    15  ## All contributed questions
    16  
    17  <!-- TOC starts here -->
    18  
    19  #### Installation,setup and environment
    20  * [What is the minimal go version required?](faq_setup.md#what-is-the-minimal-go-version-required)
    21  <!-- * [Swagger installation issues](faq_setup.md#swagger-installation-issues) -->
    22  <!-- * [What is the proper way to vendor go-swagger?](faq_setup.md#what-is-the-proper-way-to-vendor-go-swagger) -->
    23  
    24  #### Model generation
    25  * [Custom validation](faq_model.md#custom-validation)
    26  * [Non-required or nullable property?](faq_model.md#non-required-or-nullable-property)
    27  * [String parameter in body and query?](faq_model.md#string-parameter-in-body-and-query)
    28  * [Request response can have different objects returned based on query parameters](faq_model.md#request-response-can-have-different-objects-returned-based-on-query-parameters)
    29  * [How to validate dates and times?](faq_model.md#how-to-validate-dates-and-times)
    30  * [Accessing the return value from Default response](faq_model.md#accessing-the-default-return-value)
    31  * [How to avoid deep copies of complex data structures that need to be marshalled across the API?](faq_model.md#how-to-avoid-deep-copies-of-complex-data-structures-that-need-to-be-marshalled-across-the-api)
    32  * [Extra sections in POST body](faq_model.md#extra-sections-in-post-body)
    33  * [How to support generate type int?](faq_model.md#how-to-support-generate-type-int)
    34  * [Generate all models necessary for specified operation](faq_model.md#generate-all-models-necessary-for-specified-operation)
    35  * [Generated code changes the order of properties in struct](faq_model.md#generated-code-changes-the-order-of-properties-in-struct)
    36  * [Fail to use swagger generate model -name](faq_model.md#fail-to-use-swagger-generate-model-name)
    37  
    38  <!-- * How to make custom validators? -->
    39  
    40  #### Server generation and customization
    41  * [What are the dependencies required by the generated server?](faq_server.md#what-are-the-dependencies-required-by-the-generated-server)
    42  * [How to add custom flags?](faq_server.md#how-to-add-custom-flags)
    43  * [How do you integrate the flag sets of go-swagger and other packages, in particular, glog?](faq_server.md#how-do-you-integrate-the-flag-sets-of-go-swagger-and-other-packages-in-particular-glog)
    44  * [How to serve two or more swagger specs from one server?](faq_server.md#how-to-serve-two-or-more-swagger-specs-from-one-server)
    45  * [How to access access API struct inside operator handler?](faq_server.md#how-to-access-access-api-struct-inside-operator-handler)
    46  * [Use go-swagger to generate different client or servers](faq_server.md#use-go-swagger-to-generate-different-client-or-servers)
    47  * [Support streaming responses](faq_server.md#support-streaming-responses)
    48  * [OAuth authentication does not redirect to the authorization server](faq_server.md#oauth-authentication-does-not-redirect-to-the-authorization-server)
    49  * [HTTPS TLS Cipher Suites not supported by AWS Elastic LoadBalancer](faq_server.md#https-tls-cipher-suites-not-supported-by-aws-elastic-loadbalancer)
    50  * [Which mime types are supported?](faq_server.md#which-mime-types-are-supported)
    51  * [Is it possible to return error to main function of server?](faq_server.md#is-it-possible-to-return-error-to-main-function-of-server)
    52  
    53  #### Client generation
    54  * [Is there an example for dynamic client?](faq_client.md#example-for-dynamic-client)
    55  * [Can we set a User-Agent header?](faq_client.md#can-we-set-a-user-agent-header)
    56  
    57  #### Spec generation from source
    58  * [Is there an example to generate a swagger spec document from the code?](faq_spec.md#example-to-generate-a-swagger-spec-document-from-the-code?)
    59  * [Extra function in example](faq_spec.md#extra-function-in-example)
    60  * [Maps as swagger:parameters](faq_spec.md#maps-as-swagger-parameters)
    61  * [How to define a swagger:response that produces a binary file?](faq_spec.md#how-to-define-a-swagger-response-that-produces-a-binary-file)
    62  * [How to use swagger:params?](faq_spec.md#how-to-use-swagger-params)
    63  * [Empty Definitions as a result?](faq_spec.md#empty-definitions)
    64  * [Documentation / Tutorials?](faq_spec.md#documentation-or-tutorials-on-code-annotation)
    65  * [Wrong schema in response structure?](faq_spec.md#wrong-schema-in-response-structure)
    66  * [go-swagger not generating model info and showing error on swagger UI](faq_spec.md#go-swagger-not-generating-model-info-and-showing-error-on-swagger-ui)
    67  <!--* [Running on google app engine](faq_spec.md#running-on-google-app-engine)-->
    68  <!--* [Generating spec cannot import dependencies](faq_spec.md#generating-spec-cannot-import-dependencies)-->
    69  
    70  #### API testing
    71  * [Any suggestions how to leverage the generated client for benchmarking the API?](faq_testing.md#any-suggestions-how-to-leverage-the-generated-client-for-benchmarking-the-api)
    72  * [Using httptest](faq_testing.md#using-httptest)
    73  
    74  #### Documenting your API
    75  * [Serving swagger-ui with the API Server](faq_documenting.md#serving-swagger-ui-with-the-api-server)
    76  * [Serving UI from existing app](faq_documenting.md#how-to-serve-swagger-ui-from-a-preexisting-web-app)
    77  * [How to use swagger-ui/cors?](faq_server.md#how-to-use-swagger-ui-cors)
    78  * [Serving my own UI files](faq_server.md#how-to-serve-my-ui-files)
    79  
    80  #### Swagger specification
    81  * [Default vs_required](faq_swagger.md#default-vs-required)
    82  * [type string, format int64 not respected in generator](faq_swagger.md#type-string-format-int64-not-respected-in-generator)
    83  * [Duplicate operationId error](faq_swagger.md#duplicate-operationid-error)
    84  
    85  <!-- More on that...
    86  #### Documentation and tutorials
    87  -->