Copyright (c) 2003 - 2016 CGI IT Czech Republic s.r.o.
+ */ +public class AntSecurityDefinition extends SecurityDefinition { + private final Project project; + + public AntSecurityDefinition(Project project) { + this.project = project; + } + + @SuppressWarnings("unused") + public WriteBack createName() { + return new WriteBack(project, this, "name"); + } + + @SuppressWarnings("unused") + public WriteBack createType() { + return new WriteBack(project, this, "type"); + } + + @SuppressWarnings("unused") + public WriteBack createDescription() { + return new WriteBack(project, this, "description"); + } + + @SuppressWarnings("unused") + public WriteBack createJson() { + return new WriteBack(project, this, "json"); + } +} diff --git a/src/main/java/com/github/cstroe/swagger/docgen/task/AntSecurityDefinitions.java b/src/main/java/com/github/cstroe/swagger/docgen/task/AntSecurityDefinitions.java new file mode 100644 index 0000000..a165ebe --- /dev/null +++ b/src/main/java/com/github/cstroe/swagger/docgen/task/AntSecurityDefinitions.java @@ -0,0 +1,29 @@ +package com.github.cstroe.swagger.docgen.task; + +import com.github.kongchen.swagger.docgen.mavenplugin.SecurityDefinition; +import org.apache.tools.ant.Project; + +import java.util.ArrayList; + +/** + * AntSecurityDefinitions + * + * + * @author $Author$ + * @version $Revision$ + *Copyright (c) 2003 - 2016 CGI IT Czech Republic s.r.o.
+ */ +public class AntSecurityDefinitions extends ArrayListname | +type | +required | +description | +example | +
---|---|---|---|---|
{{@key}} | ++ {{#ifeq type "array"}} + {{#items.$ref}} + {{type}}[{{basename items.$ref}}] + {{/items.$ref}} + {{^items.$ref}}{{type}}[{{items.type}}]{{/items.$ref}} + {{else}} + {{#$ref}}{{basename $ref}}{{/$ref}} + {{^$ref}}{{type}}{{#format}} ({{format}}){{/format}}{{/$ref}} + {{/ifeq}} + | +{{#required}}required{{/required}}{{^required}}optional{{/required}} | +{{#description}}{{{description}}}{{/description}}{{^description}}-{{/description}} | +{{example}} | +
Name | +Located in | +Required | +Description | +Default | +Schema | +||
---|---|---|---|---|---|---|---|
{{name}} | +{{in}} | +{{#if required}}yes{{else}}no{{/if}} | +{{description}}{{#if pattern}} (**Pattern**: `{{pattern}}`){{/if}} | +- | +{{#ifeq in "body"}} ++ {{#ifeq schema.type "array"}}Array[{{basename schema.items.$ref}}]{{/ifeq}} + {{#schema.$ref}}{{basename schema.$ref}} {{/schema.$ref}} + | +{{else}} + {{#ifeq type "array"}} +Array[{{items.type}}] ({{collectionFormat}}) | + {{else}} +{{type}} {{#format}}({{format}}){{/format}} | + {{/ifeq}} +{{/ifeq}} +
type | +{{type}} | +|
---|---|---|
description | +{{description}} | +|
authorizationUrl | +{{authorizationUrl}} | +|
flow | +{{flow}} | +|
tokenUrl | +{{tokenUrl}} | +|
scopes | +{{#each scopes}} +{{@key}} | +{{this}} | +
type | +{{type}} | +|
---|---|---|
description | +{{description}} | +|
name | +{{name}} | +|
in | +{{in}} | +
type | +{{type}} | +|
---|---|---|
description | +{{description}} | +