go-swagger: github.com/go-swagger/go-swagger/cmd/swagger/commands/initcmd Index | Files

package initcmd

import "github.com/go-swagger/go-swagger/cmd/swagger/commands/initcmd"

Index

Package Files

spec.go

type Spec Uses

type Spec struct {
    Format      string   `long:"format" description:"the format for the spec document" default:"yaml" choice:"yaml" choice:"json"`
    Title       string   `long:"title" description:"the title of the API"`
    Description string   `long:"description" description:"the description of the API"`
    Version     string   `long:"version" description:"the version of the API" default:"0.1.0"`
    Terms       string   `long:"terms" description:"the terms of services"`
    Consumes    []string `long:"consumes" description:"add a content type to the global consumes definitions, can repeat" default:"application/json"`
    Produces    []string `long:"produces" description:"add a content type to the global produces definitions, can repeat" default:"application/json"`
    Schemes     []string `long:"scheme" description:"add a scheme to the global schemes definition, can repeat" default:"http"`
    Contact     struct {
        Name  string `long:"contact.name" description:"name of the primary contact for the API"`
        URL   string `long:"contact.url" description:"url of the primary contact for the API"`
        Email string `long:"contact.email" description:"email of the primary contact for the API"`
    }
    License struct {
        Name string `long:"license.name" description:"name of the license for the API"`
        URL  string `long:"license.url" description:"url of the license for the API"`
    }
}

Spec a command struct for initializing a new swagger application.

func (*Spec) Execute Uses

func (s *Spec) Execute(args []string) error

Execute this command

Package initcmd imports 8 packages (graph) and is imported by 3 packages. Updated 2017-05-02. Refresh now. Tools for package owners.