From a2410b210ca874078efce20d9cd6b3787923ceec Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 27 Jan 2018 17:09:45 +0800 Subject: [PATCH] Add auto-generated rockspec file to Lua API client (#7475) * add luarocks spec * remove trailing spaces * remove rockspec filename option * update lua rockspec * update rockspec based on feedback * remove configuration which is not needed * remove api_client, which is no longer needed --- .../codegen/languages/LuaClientCodegen.java | 21 +- .../src/main/resources/lua/README.mustache | 2 +- .../main/resources/lua/api_client.mustache | 427 ------------------ .../main/resources/lua/configuration.mustache | 43 -- .../main/resources/lua/git_push.sh.mustache | 2 +- .../src/main/resources/lua/luarocks.mustache | 43 ++ .../resources/lua/partial_header.mustache | 2 +- samples/client/petstore/lua/git_push.sh | 2 +- .../petstore/lua/petstore-1.0.0-1.rockspec | 36 ++ .../petstore/lua/petstore/api/pet_api.lua | 2 +- .../petstore/lua/petstore/api/store_api.lua | 2 +- .../petstore/lua/petstore/api/user_api.lua | 2 +- .../lua/petstore/model/api_response.lua | 2 +- .../petstore/lua/petstore/model/category.lua | 2 +- .../petstore/lua/petstore/model/order.lua | 2 +- .../petstore/lua/petstore/model/pet.lua | 2 +- .../petstore/lua/petstore/model/tag.lua | 2 +- .../petstore/lua/petstore/model/user.lua | 2 +- 18 files changed, 105 insertions(+), 491 deletions(-) delete mode 100644 modules/swagger-codegen/src/main/resources/lua/api_client.mustache delete mode 100644 modules/swagger-codegen/src/main/resources/lua/configuration.mustache create mode 100644 modules/swagger-codegen/src/main/resources/lua/luarocks.mustache create mode 100644 samples/client/petstore/lua/petstore-1.0.0-1.rockspec diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/LuaClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/LuaClientCodegen.java index 2006e9eba76f..87489eabdd7e 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/LuaClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/LuaClientCodegen.java @@ -17,10 +17,11 @@ public class LuaClientCodegen extends DefaultCodegen implements CodegenConfig { static Logger LOGGER = LoggerFactory.getLogger(LuaClientCodegen.class); - protected String packageName = "swagger"; - protected String packageVersion = "1.0.0"; + protected String packageName = "swagger-client"; + protected String packageVersion = "1.0.0-1"; protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; + protected String luaRocksFilename = "swagger-client-1.0.0-1.rockspec"; public CodegenType getTag() { return CodegenType.CLIENT; @@ -104,9 +105,9 @@ public LuaClientCodegen() { cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Lua package name (convention: lowercase).") - .defaultValue("swagger")); + .defaultValue("swagger-client")); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "Lua package version.") - .defaultValue("1.0.0")); + .defaultValue("1.0.0-1")); cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "hides the timestamp when files were generated") .defaultValue(Boolean.TRUE.toString())); @@ -126,19 +127,18 @@ public void processOpts() { if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME)); - } else { - setPackageName("swagger"); } if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION)); - } else { - setPackageVersion("1.0.0"); } additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion); + // set rockspec based on package name, version + setLuaRocksFilename(packageName + "-" + packageVersion + ".rockspec"); + additionalProperties.put("apiDocPath", apiDocPath); additionalProperties.put("modelDocPath", modelDocPath); @@ -154,6 +154,7 @@ public void processOpts() { //supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); + supportingFiles.add(new SupportingFile("luarocks.mustache", "", luaRocksFilename)); //supportingFiles.add(new SupportingFile("configuration.mustache", "", "configuration.lua")); //supportingFiles.add(new SupportingFile("api_client.mustache", "", "api_client.lua")); //supportingFiles.add(new SupportingFile("api_response.mustache", "", "api_response.lua")); @@ -443,6 +444,10 @@ public void setPackageVersion(String packageVersion) { this.packageVersion = packageVersion; } + public void setLuaRocksFilename(String luaRocksFilename) { + this.luaRocksFilename = luaRocksFilename; + } + @Override public String escapeQuotationMark(String input) { // remove " to avoid code injection diff --git a/modules/swagger-codegen/src/main/resources/lua/README.mustache b/modules/swagger-codegen/src/main/resources/lua/README.mustache index 935e0a9ec483..c8f08759b4e3 100644 --- a/modules/swagger-codegen/src/main/resources/lua/README.mustache +++ b/modules/swagger-codegen/src/main/resources/lua/README.mustache @@ -42,7 +42,7 @@ Class | Method | HTTP request | Description {{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} {{#authMethods}} ## {{{name}}} -{{#isApiKey}}- **Type**: API key +{{#isApiKey}}- **Type**: API key Example ``` diff --git a/modules/swagger-codegen/src/main/resources/lua/api_client.mustache b/modules/swagger-codegen/src/main/resources/lua/api_client.mustache deleted file mode 100644 index de052c567188..000000000000 --- a/modules/swagger-codegen/src/main/resources/lua/api_client.mustache +++ /dev/null @@ -1,427 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "errors" - "io" - "mime/multipart" - "golang.org/x/oauth2" - "golang.org/x/net/context" - "net/http" - "net/url" - "time" - "os" - "path/filepath" - "reflect" - "regexp" - "strings" - "unicode/utf8" - "strconv" -) - -var ( - jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") - xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") -) - -// APIClient manages communication with the {{appName}} API v{{version}} -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services -{{#apiInfo}} -{{#apis}} -{{#operations}} - {{classname}} *{{classname}}Service -{{/operations}} -{{/apis}} -{{/apiInfo}} -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - -{{#apiInfo}} - // API Services -{{#apis}} -{{#operations}} - c.{{classname}} = (*{{classname}}Service)(&c.common) -{{/operations}} -{{/apis}} -{{/apiInfo}} - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insenstive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.ToLower(a) == strings.ToLower(needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string - - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," - } - - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } - - return fmt.Sprintf("%v", obj) -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - return c.cfg.HTTPClient.Do(request) -} - -// Change base path to allow switching to mocks -func (c *APIClient) ChangeBasePath (path string) { - c.cfg.BasePath = path -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest ( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - fileName string, - fileBytes []byte) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if postBody != nil { - contentType := headerParams["Content-Type"] - if contentType == "" { - contentType = detectContentType(postBody) - headerParams["Content-Type"] = contentType - } - - body, err = setBody(postBody, contentType) - if err != nil { - return nil, err - } - } - - // add form parameters and file if available. - if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - if len(fileBytes) > 0 && fileName != "" { - w.Boundary() - //_, fileNm := filepath.Split(fileName) - part, err := w.CreateFormFile("file", filepath.Base(fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(fileBytes) - if err != nil { - return nil, err - } - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - } - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = query.Encode() - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers.Set(h, v) - } - localVarRequest.Header = headers - } - - // Override request host, if applicable - if c.cfg.Host != "" { - localVarRequest.Host = c.cfg.Host - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - // Walk through any authentication. - if ctx != nil { - // OAuth2 authentication - if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { - // We were able to grab an oauth2 token from the context - var latestToken *oauth2.Token - if latestToken, err = tok.Token(); err != nil { - return nil, err - } - - latestToken.SetAuthHeader(localVarRequest) - } - - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - - // AccessToken Authentication - if auth, ok := ctx.Value(ContextAccessToken).(string); ok { - localVarRequest.Header.Add("Authorization", "Bearer " + auth) - } - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - - return localVarRequest, nil -} - - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(path) - if err != nil { - return err - } - defer file.Close() - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) (error) { - return fmt.Errorf(format, a...) -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("Invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) (time.Time) { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } - expires = now.Add(lifetime) - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) (int) { - return utf8.RuneCountInString(s) -} - diff --git a/modules/swagger-codegen/src/main/resources/lua/configuration.mustache b/modules/swagger-codegen/src/main/resources/lua/configuration.mustache deleted file mode 100644 index 97bfa891d403..000000000000 --- a/modules/swagger-codegen/src/main/resources/lua/configuration.mustache +++ /dev/null @@ -1,43 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -import ( - "net/http" -) - -const ContextOAuth2 int = 1 -const ContextBasicAuth int = 2 -const ContextAccessToken int = 3 -const ContextAPIKey int = 4 - -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -type APIKey struct { - Key string - Prefix string -} - -type Configuration struct { - BasePath string `json:"basePath,omitempty"` - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - HTTPClient *http.Client -} - -func NewConfiguration() *Configuration { - cfg := &Configuration{ - BasePath: "{{{basePath}}}", - DefaultHeader: make(map[string]string), - UserAgent: "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{{packageVersion}}}/go{{/httpUserAgent}}", - } - return cfg -} - -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/lua/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/lua/git_push.sh.mustache index a2d752348373..f65b794638f7 100755 --- a/modules/swagger-codegen/src/main/resources/lua/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/lua/git_push.sh.mustache @@ -28,7 +28,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote diff --git a/modules/swagger-codegen/src/main/resources/lua/luarocks.mustache b/modules/swagger-codegen/src/main/resources/lua/luarocks.mustache new file mode 100644 index 000000000000..a1bde0dac296 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/lua/luarocks.mustache @@ -0,0 +1,43 @@ +package = "{{{packageName}}}" +version = "{{{packageVersion}}}" +source = { + url = "https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}}.git" +} + +description = { + summary = "API client genreated by Swagger Codegen", + detailed = [[ +{{{appDescription}}}]], + homepage = "https://github.com/swagger-api/swagger-codegen", + license = "Unlicense", + maintainer = "Swagger Codegen contributors", +} + +dependencies = { + "lua >= 5.2", + "http", + "dkjson", + "basexx" +} + +build = { + type = "builtin", + modules = { + {{#apiInfo}} + {{#apis}} + {{#operations}} + {{#operation}} + {{#-first}} + ["{{{classname}}}"] = "{{{packageName}}}/api/{{{classname}}}.lua"; + {{/-first}} + {{/operation}} + {{/operations}} + {{/apis}} + {{/apiInfo}} + {{#models}} + {{#model}} + ["{{{classname}}}"] = "{{{packageName}}}/model/{{{classname}}}.lua"; + {{/model}} + {{/models}} + } +} diff --git a/modules/swagger-codegen/src/main/resources/lua/partial_header.mustache b/modules/swagger-codegen/src/main/resources/lua/partial_header.mustache index 63da5d8fc1ee..b09571bf6427 100644 --- a/modules/swagger-codegen/src/main/resources/lua/partial_header.mustache +++ b/modules/swagger-codegen/src/main/resources/lua/partial_header.mustache @@ -1,4 +1,4 @@ ---[[ +--[[ {{#appName}} {{{appName}}} diff --git a/samples/client/petstore/lua/git_push.sh b/samples/client/petstore/lua/git_push.sh index ae01b182ae9e..160f6f213999 100644 --- a/samples/client/petstore/lua/git_push.sh +++ b/samples/client/petstore/lua/git_push.sh @@ -28,7 +28,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote diff --git a/samples/client/petstore/lua/petstore-1.0.0-1.rockspec b/samples/client/petstore/lua/petstore-1.0.0-1.rockspec new file mode 100644 index 000000000000..b0b382b080ce --- /dev/null +++ b/samples/client/petstore/lua/petstore-1.0.0-1.rockspec @@ -0,0 +1,36 @@ +package = "petstore" +version = "1.0.0-1" +source = { + url = "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" +} + +description = { + summary = "API client genreated by Swagger Codegen", + detailed = [[ +This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.]], + homepage = "https://github.com/swagger-api/swagger-codegen", + license = "Unlicense", + maintainer = "Swagger Codegen contributors", +} + +dependencies = { + "lua >= 5.2", + "http", + "dkjson", + "basexx" +} + +build = { + type = "builtin", + modules = { + ["pet_api"] = "petstore/api/pet_api.lua"; + ["store_api"] = "petstore/api/store_api.lua"; + ["user_api"] = "petstore/api/user_api.lua"; + ["api_response"] = "petstore/model/api_response.lua"; + ["category"] = "petstore/model/category.lua"; + ["order"] = "petstore/model/order.lua"; + ["pet"] = "petstore/model/pet.lua"; + ["tag"] = "petstore/model/tag.lua"; + ["user"] = "petstore/model/user.lua"; + } +} diff --git a/samples/client/petstore/lua/petstore/api/pet_api.lua b/samples/client/petstore/lua/petstore/api/pet_api.lua index 77157811f213..f9de7e39135a 100644 --- a/samples/client/petstore/lua/petstore/api/pet_api.lua +++ b/samples/client/petstore/lua/petstore/api/pet_api.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/lua/petstore/api/store_api.lua b/samples/client/petstore/lua/petstore/api/store_api.lua index ac17bacacad5..96927a16f9c5 100644 --- a/samples/client/petstore/lua/petstore/api/store_api.lua +++ b/samples/client/petstore/lua/petstore/api/store_api.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/lua/petstore/api/user_api.lua b/samples/client/petstore/lua/petstore/api/user_api.lua index 78c13f6972e2..0369cf1e8bd4 100644 --- a/samples/client/petstore/lua/petstore/api/user_api.lua +++ b/samples/client/petstore/lua/petstore/api/user_api.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/lua/petstore/model/api_response.lua b/samples/client/petstore/lua/petstore/model/api_response.lua index 4f4572654ba3..9e9760f09028 100644 --- a/samples/client/petstore/lua/petstore/model/api_response.lua +++ b/samples/client/petstore/lua/petstore/model/api_response.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/lua/petstore/model/category.lua b/samples/client/petstore/lua/petstore/model/category.lua index 96d7f56299ae..9bca59f3f147 100644 --- a/samples/client/petstore/lua/petstore/model/category.lua +++ b/samples/client/petstore/lua/petstore/model/category.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/lua/petstore/model/order.lua b/samples/client/petstore/lua/petstore/model/order.lua index a6346a326cc8..ac2a2ff36212 100644 --- a/samples/client/petstore/lua/petstore/model/order.lua +++ b/samples/client/petstore/lua/petstore/model/order.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/lua/petstore/model/pet.lua b/samples/client/petstore/lua/petstore/model/pet.lua index 763bc79f3cb2..f9d1cf11a4b9 100644 --- a/samples/client/petstore/lua/petstore/model/pet.lua +++ b/samples/client/petstore/lua/petstore/model/pet.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/lua/petstore/model/tag.lua b/samples/client/petstore/lua/petstore/model/tag.lua index 3d8fb67e680f..9d78e25979e6 100644 --- a/samples/client/petstore/lua/petstore/model/tag.lua +++ b/samples/client/petstore/lua/petstore/model/tag.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. diff --git a/samples/client/petstore/lua/petstore/model/user.lua b/samples/client/petstore/lua/petstore/model/user.lua index 674555f48ad2..4d2e5bfe2195 100644 --- a/samples/client/petstore/lua/petstore/model/user.lua +++ b/samples/client/petstore/lua/petstore/model/user.lua @@ -1,4 +1,4 @@ ---[[ +--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.