<!DOCTYPE html>
<html lang="en-us">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
  <title>Generates</title>
  <link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css" type="text/css" media="screen,projection">
  <link href="//goswagger.io//css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
  <link rel="stylesheet" href="//goswagger.io//css/prism.css" />
  <style type="text/css">
  
    footer.page-footer{background-image: url(//goswagger.io//images/default.png);}
  
  </style>
</head>
<body>
  <ul id="slide-out" class="side-nav">
    <li><a href="//goswagger.io/"><i class="mdi-action-home left"></i>Home</a></li>
    <li><a href="//goswagger.io//generate/spec/"><i class="mdi-action-loyalty left"></i>Swagger.json</a></li>
    <li><a href="//goswagger.io//generate/client/"><i class="mdi-action-polymer left"></i>Generate Client</a></li>
    <li><a href="//goswagger.io//generate/server/"><i class="mdi-action-perm-data-setting left"></i>Generate Server</a></li>
    <li><a href="//goswagger.io//usage/validate/"><i class="mdi-action-perm-media left"></i>Validate Spec</a></li>

    
    
  </ul>
  <div id="index-banner" class="parallax-container">
  <a data-activates="slide-out" class="btn-floating button-collapse" style="top: 5px; left: 5px;"><i class="mdi-navigation-menu"></i></a>
    <div class="section no-pad-bot">
      <div class="container">
        <h1 class="header center teal-text text-lighten-2"><a href="//goswagger.io/">go-swagger toolkit</a></h1>
        <div class="row center">
          <h5 class="header col s12 light">Swagger 2.0 describes your API&#39;s for you, so you don&#39;t have to</h5>
        </div>
        <div class="row center">
        
          <a href="https://github.com/go-swagger/go-swagger"><img src="//goswagger.io//images/github2-dreamstale35.png"></a>
        
        
        
        
        
        </div>
      </div>
    </div>
    <div class="parallax">
    
      <img src="//goswagger.io//images/default.png">
    
    </div>
  </div>


<div class="container">
  <div class="section">


<div class="row">

  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/spec/">swagger.json generation</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/generate/">generate</a>
        
      
      </p>
      <p><p>The toolkit has a command that will let you generate a swagger spec document from your code.
The command integrates with go doc comments, and makes use of structs when it needs to know of
types.</p>
</p>
      <p>
      9 Nov 2015
      
      </p>
    </div>
  </div>

  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/client/">Generate an API client</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/generate/">generate</a>
        
          <a href="//goswagger.io//categories/client/">client</a>
        
      
      </p>
      <p><p>The toolkit has a command that will let you generate a client.</p>
</p>
      <p>
      23 Oct 2015
      
      </p>
    </div>
  </div>

  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/server/">Generate a server for a swagger spec</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/generate/">generate</a>
        
          <a href="//goswagger.io//categories/server/">server</a>
        
      
      </p>
      <p><p>The toolkit has a command that will let you generate a docker friendly server with support for TLS.
You can configure it through environment variables that are commonly used on PaaS services.</p>
</p>
      <p>
      22 Nov 2015
      
      </p>
    </div>
  </div>

  
</div>
<div class="row">
  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/spec/meta/">swagger:meta</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/spec/">spec</a>
        
      
      </p>
      <p>The swagger:meta annotation flags a file as source for metadata about the API. This is typically a doc.go file with your package documentation. You can specify a Consumes and Produces key which has a new content type on each line Schemes is a tag that is required and allows for a comma separated string composed of: http, https, ws or wss Host and BasePath can be specified but those values will be defaults, they should get substituted when serving the swagger spec.</p>
      <p>
      14 Nov 2015
      
        
          <a href="//goswagger.io//tags/meta-data/">#meta data</a>
        
      
      </p>
    </div>
  </div>

  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/spec/route/">swagger:route</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/spec/">spec</a>
        
      
      </p>
      <p><p>A <strong>swagger:route</strong> annotation links a path to a method.
This operation gets a unique id, which is used in various places as method name.
One such usage is in method names for client generation for example.</p>

<p>Because there are many routers available, this tool does not try to parse the paths
you provided to your routing library of choice. So you have to specify your path pattern
yourself in valid swagger syntax.</p>
</p>
      <p>
      14 Nov 2015
      
        
          <a href="//goswagger.io//tags/operations/">#operations</a>
        
      
      </p>
    </div>
  </div>

  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/spec/params/">swagger:params</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/spec/">spec</a>
        
      
      </p>
      <p><p>The <strong>swagger:params</strong> annotation links a struct to one or more operations. The params in the resulting swagger spec can be composed of several structs.
There are no guarantees given on how property name overlaps are resolved when several structs apply to the same operation.
This tag works very similar to the swagger:model tag except that it produces valid parameter objects instead of schema
objects.</p>
</p>
      <p>
      14 Nov 2015
      
        
          <a href="//goswagger.io//tags/operations/">#operations</a>
        
      
      </p>
    </div>
  </div>

  
</div>
<div class="row">
  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/spec/response/">swagger:response</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/spec/">spec</a>
        
      
      </p>
      <p><p>Reads a struct decorated with <strong>swagger:response</strong> and uses that information to fill up the headers and the schema for a response.
A swagger:route can specify a response name for a status code and then the matching response will be used for that operation in the swagger definition.</p>
</p>
      <p>
      14 Nov 2015
      
        
          <a href="//goswagger.io//tags/operations/">#operations</a>
        
      
      </p>
    </div>
  </div>

  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/spec/model/">swagger:model</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/spec/">spec</a>
        
      
      </p>
      <p><p>A <strong>swagger:model</strong> annotation optionally gets a model name as extra data on the line.
when this appears anywhere in a comment for a struct, then that struct becomes a schema
in the definitions object of swagger.</p>
</p>
      <p>
      14 Nov 2015
      
        
          <a href="//goswagger.io//tags/definitions/">#definitions</a>
        
      
      </p>
    </div>
  </div>

  
  <div class="col m4 s12">
    <div class="card-panel">
      <h4><a href="//goswagger.io/generate/spec/allOf/">swagger:allOf</a></h4>
      <p>
      
        
          <a href="//goswagger.io//categories/spec/">spec</a>
        
      
      </p>
      <p><p>Marks an embedded type as  a member for allOf</p>
</p>
      <p>
      14 Nov 2015
      
        
          <a href="//goswagger.io//tags/polymorphism/">#polymorphism</a>
        
      
      </p>
    </div>
  </div>

</div>


<div class="row">
  <div class="col s3 m1">
  
    <a class="btn-floating btn-large disabled"><i class="mdi-navigation-arrow-back"></i></a>
  
  </div>
  <div class="col s6 m10 center">&nbsp</div>
  <div class="col s3 m1">
  
    <a class="btn-floating btn-large waves-effect waves-light" href="/generate/page/2/"><i class="mdi-navigation-arrow-forward"></i></a>
  
  </div>
</div>


  </div>
</div>

  <footer class="page-footer">
    <div class="footer-copyright">
      <div class="container">
      © 2015 go-swagger contributors
      <div class="right">Design <a class="grey-text text-lighten-4" href="http://pdevty.github.io/blog/">pdevty</a></div>
      </div>
    </div>
  </footer>
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script>
  <script src="//goswagger.io//js/init.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/prism/0.0.1/prism.min.js"></script>
  

  </body>
</html>

