Skip to content

Commit

Permalink
fix link to file, add .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Mar 9, 2016
1 parent 998087d commit 7dff269
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ public void processOpts() {

supportingFiles.add(new SupportingFile("ApiClient.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiClient.pm"));
supportingFiles.add(new SupportingFile("Configuration.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "Configuration.pm"));
supportingFiles.add(new SupportingFile("ApiFactory.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiFactory.pm"));
supportingFiles.add(new SupportingFile("Role.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "Role.pm"));
supportingFiles.add(new SupportingFile("ApiFactory.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiFactory.pm")); supportingFiles.add(new SupportingFile("Role.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "Role.pm"));
supportingFiles.add(new SupportingFile("AutoDoc.mustache", ("lib/" + modulePathPart + "/Role").replace('/', File.separatorChar), "AutoDoc.pm"));
supportingFiles.add(new SupportingFile("autodoc.script.mustache", "bin", "autodoc"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if ($@) {
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}
{{/allParams}}

### Return type
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace IO.Swagger.Model
{
/// <summary>
///
/// </summary>
[DataContract]
public partial class Task : IEquatable<Task>
{

/// <summary>
/// Initializes a new instance of the <see cref="Task" /> class.
/// Initializes a new instance of the <see cref="Task" />class.
/// </summary>
/// <param name="_Return">_Return.</param>

public Task(int? _Return = null)
{
this._Return = _Return;

}


/// <summary>
/// Gets or Sets _Return
/// </summary>
[DataMember(Name="return", EmitDefaultValue=false)]
public int? _Return { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class Task {\n");
sb.Append(" _Return: ").Append(_Return).Append("\n");

sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as Task);
}

/// <summary>
/// Returns true if Task instances are equal
/// </summary>
/// <param name="other">Instance of Task to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(Task other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;

return
(
this._Return == other._Return ||
this._Return != null &&
this._Return.Equals(other._Return)
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)

if (this._Return != null)
hash = hash * 59 + this._Return.GetHashCode();

return hash;
}
}

}
}
20 changes: 20 additions & 0 deletions samples/client/petstore/perl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/blib/
/.build/
_build/
cover_db/
inc/
Build
!Build/
Build.bat
.last_cover_stats
/Makefile
/Makefile.old
/MANIFEST.bak
/META.yml
/META.json
/MYMETA.*
nytprof.out
/pm_to_blib
*.o
*.bs
/_eumm/
2 changes: 1 addition & 1 deletion samples/client/petstore/perl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore

Automatically generated by the Perl Swagger Codegen project:

- Build date: 2016-03-08T19:21:31.731+08:00
- Build date: 2016-03-09T16:16:31.021+08:00
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
- Codegen version:

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/perl/docs/PetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
**additional_metadata** | **string**| Additional data to pass to server | [optional]
**file** | [**File**](.md)| file to upload | [optional]
**file** | **File**| file to upload | [optional]

### Return type

Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
default => sub { {
app_name => 'Swagger Petstore',
app_version => '1.0.0',
generated_date => '2016-03-08T19:21:31.731+08:00',
generated_date => '2016-03-09T16:16:31.021+08:00',
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
} },
documentation => 'Information about the application version and the codegen codebase version'
Expand Down Expand Up @@ -103,7 +103,7 @@ Automatically generated by the Perl Swagger Codegen project:
=over 4
=item Build date: 2016-03-08T19:21:31.731+08:00
=item Build date: 2016-03-09T16:16:31.021+08:00
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
Expand Down

0 comments on commit 7dff269

Please sign in to comment.