Dave Baird
25c19135ff
autodoc can analyse arbitrary classes
...
- added -c option to load and analyse any class
2015-11-12 14:55:48 +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
06db67210c
Tiny doc tweak
2015-11-10 14:50:22 +01:00
Dave Baird
77b9f51927
More documentation, and clean up a couple of ragged edges
...
- added documentation for configuring authentication
- made auth_setup_handler() optional
- get_api_key_with_prefix() is more self-documenting
2015-11-10 14:22:32 +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
Dave Baird
6a5f583ab0
Merge remote-tracking branch 'upstream/master'
2015-11-08 10:13:34 +00:00
Dave Baird
6c19f0c26c
Flatten entire API into a single class
...
Added a Moose role which flattens all the individual endpoint APIs into
a single class.
2015-11-07 20:37:13 +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
f521680c0f
Moved object classes' constructor into base class
2015-11-04 21:42:27 +01:00
Dave Baird
4264b74e40
Minor tidying up
...
Some documentation, fix a warning, added a couple of logger calls.
2015-11-04 20:27:23 +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
Ampem Darko
57e3ea3e9c
Ensure parameters to "each" is a hash in TO_JSON and from_hash
2015-10-21 13:35:48 +00:00
Tony Tam
a21f08118e
rebuilt
2015-10-20 10:31:42 -07:00
wing328
3eca940e7d
fix perl and asyncscala optional tab
2015-06-26 23:56:20 +08:00
William Cheng
8858e7d7e3
update perl sample
2015-06-18 02:44:40 +08:00
wing328
10e07eaf74
add support for cli (perl)
2015-06-18 10:57:09 +08:00
wing328
303dbe7730
fix array,map for perl, add test case
2015-06-10 10:53:21 +08:00
fehguy
3d2f09a693
updated versions
2015-06-09 00:25:09 -07:00
Ron
1c2d0656b0
Code reformatting
2015-06-07 11:56:08 -04:00
Ron
96107193e9
updated reverb references
2015-06-07 11:18:49 -04:00
wing328
5a75eba42b
regenerated perl sample
2015-06-05 18:30:58 +08:00
wing328
0423e0a2df
support object response
2015-06-04 21:12:26 +08:00
wing328
9b919c54dd
added http basic auth test
2015-06-03 11:21:10 +08:00
wing328
fceaed34e4
rename apiclient
2015-06-03 10:19:07 +08:00
wing328
3d16d8b2b6
fix header
2015-06-03 08:34:45 +08:00
wing328
1a868abdfa
rename APIClient to ApiClient
2015-05-28 10:51:36 +08:00
wing328
2c12312b97
update user agent and add more test cases
2015-05-27 22:44:56 +08:00
wing328
866b546cfd
make api client pluggable
2015-05-27 17:56:39 +08:00
wing328
7fc2f74851
remove commented code
2015-05-18 16:39:33 +08:00
wing328
abbea5ec4c
better logic for accept and content-type, added test cases
2015-05-18 16:23:46 +08:00
William Cheng
7a5db5e665
add pom.xml for perl integration test
2015-05-16 16:44:32 +08:00
William Cheng
9904c0e09f
add unit testing for pet
2015-05-16 15:37:58 +08:00
William Cheng
fc43828c20
update type mapping, update test.pl to use local file for testing upload
2015-05-08 03:58:02 +08:00
William Cheng
063a1ffd36
update type list in deserialize
2015-05-08 03:58:02 +08:00
William Cheng
1d4735f76d
update subroutine argument
2015-05-08 03:58:01 +08:00
William Cheng
c03250132d
update error message, update test script
2015-05-08 03:58:01 +08:00
William Cheng
48844442fc
test post body (model), fix to_hash attribute mapping
2015-05-08 03:58:01 +08:00
William Cheng
f69fb40c71
add methods for static variable
2015-05-08 03:58:01 +08:00
William Cheng
0a34793f5a
add inheritance to object (model)
2015-05-08 03:58:00 +08:00