forked from loafle/openapi-generator-original
updated year in comments
This commit is contained in:
parent
dd9da67f51
commit
2bc5e71f91
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -12,11 +12,13 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
* {{description}}
|
* {{description}}
|
||||||
**/{{/description}}
|
**/{{/description}}
|
||||||
@ApiModel(description = "{{{description}}}")
|
@ApiModel(description = "{{{description}}}")
|
||||||
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { {{#vars}}
|
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
|
||||||
private {{{datatype}}} {{name}} = {{{defaultValue}}};{{#allowableValues}}
|
{{#vars}}{{#isEnum}}
|
||||||
|
public enum {{datatype}} {
|
||||||
//{{^min}}public enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };
|
{{#allowableValues}}{{#values}} {{.}}, {{/values}}{{/allowableValues}}
|
||||||
{{/min}}{{/allowableValues}}{{/vars}}
|
};
|
||||||
|
private {{{datatype}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{^isEnum}}
|
||||||
|
private {{{datatype}}} {{name}} = {{{defaultValue}}};{{/isEnum}}{{/vars}}
|
||||||
|
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
/**{{#description}}
|
/**{{#description}}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,19 +1,3 @@
|
|||||||
/**
|
|
||||||
* Copyright 2014 Reverb, Inc.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.wordnik.swagger.generator.resource;
|
package com.wordnik.swagger.generator.resource;
|
||||||
|
|
||||||
import com.wordnik.swagger.codegen.*;
|
import com.wordnik.swagger.codegen.*;
|
||||||
@ -37,6 +21,7 @@ public class SwaggerResource {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/download/{fileId}")
|
@Path("/download/{fileId}")
|
||||||
@Produces({"application/zip", "application/json"})
|
@Produces({"application/zip", "application/json"})
|
||||||
|
@ApiOperation(value = "Downloads a pre-generated file", response = File.class)
|
||||||
public Response downloadFile(@PathParam("fileId") String fileId) throws Exception {
|
public Response downloadFile(@PathParam("fileId") String fileId) throws Exception {
|
||||||
Generated g = fileMap.get(fileId);
|
Generated g = fileMap.get(fileId);
|
||||||
System.out.println("looking for fileId " + fileId);
|
System.out.println("looking for fileId " + fileId);
|
||||||
@ -58,8 +43,7 @@ public class SwaggerResource {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/clients/{language}")
|
@Path("/clients/{language}")
|
||||||
@Produces({"application/zip", "application/json"})
|
@Produces({"application/zip", "application/json"})
|
||||||
@ApiOperation(value = "Generates a client library based on the config",
|
@ApiOperation(value = "Generates a client library based on the config")
|
||||||
notes = "The model representing this is not accurate, it needs to contain a consolidated JSON structure")
|
|
||||||
public Response generateClient(
|
public Response generateClient(
|
||||||
@ApiParam(value = "The target language for the client library", allowableValues = "android,java,php,objc,docs", required = true) @PathParam("language") String language,
|
@ApiParam(value = "The target language for the client library", allowableValues = "android,java,php,objc,docs", required = true) @PathParam("language") String language,
|
||||||
@ApiParam(value = "Configuration for building the client library", required = true) GeneratorInput opts) throws Exception {
|
@ApiParam(value = "Configuration for building the client library", required = true) GeneratorInput opts) throws Exception {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014 Reverb, Inc.
|
* Copyright 2015 Reverb, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user