Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto-generated cpanfile in Perl client #17662

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ public PerlClientCodegen() {

// option to change the order of form/body parameter
cliOptions.add(CliOption.newBoolean(
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS,
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS_DESC)
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS,
CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS_DESC)
.defaultValue(Boolean.FALSE.toString()));

}
Expand Down Expand Up @@ -202,6 +202,7 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
supportingFiles.add(new SupportingFile("cpanfile.mustache", "", "cpanfile"));
}

@Override
Expand Down Expand Up @@ -700,9 +701,9 @@ public CodegenModel fromModel(String name, Schema sc) {
* A custom version is made for this method to ensure that
* property.format remains empty string
*
* @param name name of the property
* @param p OAS property schema
* @param required true if the property is required in the next higher object schema, false otherwise
* @param name name of the property
* @param p OAS property schema
* @param required true if the property is required in the next higher object schema, false otherwise
* @param schemaIsFromAdditionalProperties true if the property is defined by additional properties schema
* @return Codegen Property object
*/
Expand All @@ -714,5 +715,7 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo
}

@Override
public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.PERL; }
public GeneratorLanguage generatorLanguage() {
return GeneratorLanguage.PERL;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
requires 'Class::Accessor';
requires 'Test::Exception';
requires 'Test::More';
requires 'Log::Any';
requires 'LWP::UserAgent';
requires 'URI::Query';
requires 'Module::Runtime';
requires 'DateTime';
requires 'Module::Find';
requires 'Moose::Role';
requires 'JSON', '>= 2.00, < 2.80';
1 change: 1 addition & 0 deletions samples/client/petstore/perl/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.travis.yml
README.md
bin/autodoc
cpanfile
docs/AdditionalPropertiesClass.md
docs/AllOfWithSingleRef.md
docs/Animal.md
Expand Down
11 changes: 11 additions & 0 deletions samples/client/petstore/perl/cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
requires 'Class::Accessor';
requires 'Test::Exception';
requires 'Test::More';
requires 'Log::Any';
requires 'LWP::UserAgent';
requires 'URI::Query';
requires 'Module::Runtime';
requires 'DateTime';
requires 'Module::Find';
requires 'Moose::Role';
requires 'JSON', '>= 2.00, < 2.80';