Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

RFC: Swagger-codegen for Perl

by wing328 (Initiate)
on May 15, 2015 at 06:17 UTC ( #1126733=perlmeditation: print w/replies, xml ) Need Help??

Hi all, contains a template-driven engine to generate client code in different languages by parsing your Swagger Resource Declaration. Recently I've added the Perl template. To test the code generation, please perform the following (assuming you've the dependencies installed):

git clone git checkout develop_2.0 git checkout mvn clean && ./bin/

If you do not want to install the dependencies and just want to get a peek at the auto-generated Perl SDK, please go to the directory samples/client/petstore/perl to have a look at the Perl SDK for Petstore (please make sure you're in the develop_2.0 branch)

The Perl SDK is not perfect and I would appreciate your time to test and review, and share with me your feedback.

(ideally I would like to post this at "Meditations" but I couldn't find a way to post there)


Replies are listed 'Best First'.
Re: RFC: Swagger-codegen for Perl
by TGI (Parson) on May 26, 2015 at 06:39 UTC

    I am thrilled to see Swagger and Perl working together.

    After the most superficial review, one thing stands out. The APIClient.mustache file uses the best-avoided Switch module.

    There are a number of ways to write the code without switch. I recommend either chaining if () {} elsif () {} or using a hash as a dispatch table.

    I'll try to get a more in depth look, and see if I have any other comments.

    TGI says moo

      Thanks TGI. I'll revise the code to avoid using Switch
        Submitted to avoid using Switch and make API client more pluggable
      another easy criticism, comments instead of pod
        yes, i want to use pod but didn't have cycle to do it :( if you've time, would be nice if you can submit a PR to update the comment
Re: RFC: Swagger-codegen for Perl
by Anonymous Monk on May 15, 2015 at 07:26 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1126733]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2021-06-19 16:19 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (93 votes). Check out past polls.