Commit Graph

32 Commits

Author SHA1 Message Date
wing328
47bb5689d9 better hanlding of model name starting with number 2016-03-17 11:49:06 +08:00
wing328
2c5be10589 add git push script to perl 2016-03-11 16:25:45 +08:00
wing328
df61aa1a14 add auth setting to perl doc 2016-03-08 20:07:46 +08:00
wing328
24c47c7434 add new files for perl generator 2016-03-08 17:07:53 +08:00
wing328
e0b16151f4 better model name for perl 2016-03-04 14:39:28 +08:00
wing328
7e63226ed4 update wording for test file, minor tweats to petstore test 2016-03-03 20:19:37 +08:00
wing328
5db16325d4 update perl model to support prefix and suffix 2016-02-27 21:47:07 +08:00
wing328
2ed02ee187 better handling of reserved keyword in perl 2016-02-24 21:57:29 +08:00
wing328
3d9a331666 automaticallay generate test cases for Perl 2016-02-11 08:24:51 +08:00
wing328
bfc83b330f fix indent, update perl & python sample 2016-01-17 19:32:50 +08:00
David Bartle
99842f646f more flexible perl module naming
- No more presuming 'WWW::' is at the beginning
  (default is now "WWW::SwaggerClient" vs "SwaggerClient" in order
   to accomodate)
- Test that module names Like::This write to the filesystem and in
  the mustache templates properly
2016-01-04 20:38:07 -08:00
Dave Baird
995a1f547f Removed endpoint API class documentation code
- there is no standard way for a swagger spec to define descriptive
information for an endpoint API
- added markdown as a format to the autodoc script
- added some version information to autogenerated docs
2015-11-13 19:30:47 +01:00
Dave Baird
c097696276 Added more formats to autodoc output
- narrow
- wide
- POD
- HTML
2015-11-12 13:03:04 +01:00
Dave Baird
389ce144ef Improved documentation methods
- API classes have rudimentary class doc info and useful method doc info
- object classes have more detailed method and class info
- added more tests for doc methods
2015-11-12 00:36:30 +01:00
Dave Baird
2144cf5d31 Handle missing security spec more elegantly
- remove the optional auth_setup_handler() callback mechanism
- add _global_auth_setup() method on ApiClient to analyse config when
security spec not provided
- add methods on the Configuration class to abstract getting and setting
tokens
2015-11-11 13:43:40 +01:00
Dave Baird
521b73b3ef Apply the singleton pattern to ApiClient
- make the api_client a singleton
- remove it from the configuration namespace
2015-11-10 09:47:58 +01:00
Dave Baird
c06af6d141 Documentation and automatic documentation
- added POD to Role.pm
- added README.md files translated from Role.pm POD
- added an autodoc script (based on AutoDoc.pm role). The script prints
a listing of the methods built in Role.pm
- added class_documentation() and method_documentation() accessors on
all object and API classes which return the documentation supplied in
the Swagger spec for the API
2015-11-09 23:04:59 +01:00
Dave Baird
49034946a0 Make class and method documentation available
Documentation from the swagger spec is available via methods
class_documentation() and method_documentation() on object and API
classes.
2015-11-09 17:04:19 +01:00
Dave Baird
f0f43f5fdf Fix method names clash in Moose Role
When flattening all endpoint API methods into a single class, some
method names may clash, e.g. every API has a new() method. So we skip
them, they must be accessed via the API method. Warnings are emitted to
document skipped methods.
2015-11-08 21:51:26 +01:00
wing328
4bfc032a64 add oauth2 support for Perl 2015-11-05 16:32:46 +08:00
Dave Baird
baf20ca226 Fix errors from using wrong JSON spec
I've been using http://petstore.swagger.io/v2/swagger.json instead of
modules/swagger-codegen/src/test/resources/2_0/petstore.json as the
input spec for building the petstore. This commit reverts the changes
introduced from that.
2015-11-04 22:24:49 +01:00
Dave Baird
37b123530f Add ApiFactory class and proper accessors on object classes
ApiFactory provides a get_api() method to generate API objects without
having to hard-code class names. All API and object classes are loaded
automatically.

Also, added proper accessors for attributes of object classes.
2015-11-03 17:58:53 +01:00
Dave Baird
8428e7963b Rebuild perl petstore client after previous updates
At least 2 previous updates were committed without rebuilding the perl
petstore client. One was my fault (BaseObject.pm changes), the other
changes come from an upstream update or updates  I can't identify.
2015-11-03 16:46:47 +01:00
wing328
9f7427b1cf Merge pull request #1489 from dvz5/master
Fix array query param processing
2015-11-02 21:36:25 +08:00
Dave Baird
3559a8bd09 Fix array query param processing
A couple of PHP functions that don't exist in Perl were being called to
process array query parameters.
2015-11-02 10:47:46 +01:00
dvz5
08f424824c Update 02_store_api.t 2015-11-01 23:14:22 +01:00
dvz5
2e03ecc4b8 Update 01_pet_api.t
Add tests for photoUrls, to check correct mapping from object attribute name to JSON attribute name.
2015-11-01 23:10:20 +01:00
wing328
303dbe7730 fix array,map for perl, add test case 2015-06-10 10:53:21 +08:00
wing328
1a868abdfa rename APIClient to ApiClient 2015-05-28 10:51:36 +08:00
wing328
866b546cfd make api client pluggable 2015-05-27 17:56:39 +08:00
wing328
abbea5ec4c better logic for accept and content-type, added test cases 2015-05-18 16:23:46 +08:00
William Cheng
9904c0e09f add unit testing for pet 2015-05-16 15:37:58 +08:00