6af9b92878Update datetypename() to work with DictType and ArrayType instances.
Doug Hellmann
2012-12-05 19:22:14 -05:00
322dca63c5show the docstring for a type before the formatted sample values
Doug Hellmann
2012-12-05 13:06:58 -05:00
4fb26f6f2duse tag name 'result' for sample data to match data returned by services
Doug Hellmann
2012-12-05 13:06:25 -05:00
38f5dd2bfdAdd a test for client-side errors
Christophe de Vienne
2012-12-06 16:52:21 +01:00
4edbd4bb8fAllow adapters to use the format_exception function, and use it in the Pecan adapter. /\!\ the response status is not properly changed by the decorator yet.
Christophe de Vienne
2012-12-06 16:51:51 +01:00
bd95dafa7bAllow the method autodocumenter (.. autofunction) to work without a Service parent (ie without a WSRoot). Added the path & method parameters that NOT considered for now.
Christophe de Vienne
2012-12-06 16:18:01 +01:00
dcd2d9233fPEP8
Christophe de Vienne
2012-12-06 15:19:19 +01:00
dbd435a2feMerged in dhellmann/wsme-validate (pull request #2)
Christophe de Vienne
2012-12-05 22:33:36 +01:00
aedf967cf5tighten up validate_value logic and allow string promotion to integers
Doug Hellmann
2012-12-05 10:51:50 -05:00
15a239350eignore all coverage output files
Doug Hellmann
2012-12-05 10:51:26 -05:00
d940f3f3aerestrict the types that can be promoted to float
Doug Hellmann
2012-12-05 10:32:24 -05:00
ac7b9727dbFix samples for functions parameters and return types
Christophe de Vienne
2012-12-02 23:24:50 +01:00
0046730542Fix xml & json samples by autotype
Christophe de Vienne
2012-12-02 22:39:45 +01:00
143bbb189bresolve types in pecan.wsexpose. It is a temporary solution.
Christophe de Vienne
2012-11-29 22:24:39 +01:00
67bf6c3dc4resolve types in pecan.wsexpose. It is a temporary solution.
Christophe de Vienne
2012-11-29 22:24:39 +01:00
cbb5caf4bfMerged in dhellmann/wsme-validate (pull request #1)
Christophe de Vienne
2012-11-29 22:18:11 +01:00
7def85c238Fix the encode_result call
Christophe de Vienne
2012-11-29 21:58:42 +01:00
5c496a3078allow type promotion to float
Doug Hellmann
2012-11-29 15:12:40 -05:00
33d852b2e4Use the new encode_result functions of the rest encoding modules
Christophe de Vienne
2012-11-29 00:13:51 +01:00
e2892482caAdd unittests for returning array and dict of objects as attributes.
Christophe de Vienne
2012-11-28 22:40:53 +01:00
cda8563e5aAdd unittests for returning array and dict of objects as attributes.
Christophe de Vienne
2012-11-28 22:40:53 +01:00
a8be9c213cFix the __eq__ operator for ArrayType
Christophe de Vienne
2012-11-28 22:21:39 +01:00
71b667a5e1Fix the __eq__ operator for ArrayType
Christophe de Vienne
2012-11-28 22:21:39 +01:00
cf0b4c4ea3Remove useless imports
Christophe de Vienne
2012-11-28 21:02:58 +01:00
440a3b47eaRemove useless imports
Christophe de Vienne
2012-11-28 21:02:58 +01:00
fda0ddd830Adapter for turbogears 1.1
Christophe de Vienne
2012-11-28 22:35:17 +01:00
374e11be1cAdding a tg 2.1 test case (not enabled for now)
Christophe de Vienne
2012-11-26 16:38:50 +01:00
d3f1ba4884Reorganise the tg1x adapters, and make the tg 1.5 adapter able to handle multiprotocol on 'native' rest
Christophe de Vienne
2012-11-26 13:55:27 +01:00
39cc2ffc8fThe tg1 adapter can now expose rest functions outside the WSRoot _and_ enable other other protocols. Soap is tested.
Christophe de Vienne
2012-11-26 01:27:37 +01:00
ade5325e13Change the scan_api interface. It now yield the original function and static args (typically the 'self' attribute). Thanks to that the lookup_function method of WSRoot can access functions outside the WSRoot.
Christophe de Vienne
2012-11-26 01:25:51 +01:00
15417d2ac0Fix the module names
Christophe de Vienne
2012-11-08 16:14:42 +01:00
c1ba69fa28args_from_body now ignore empty bodies.
Christophe de Vienne
2012-11-08 15:02:59 +01:00
25b0efaf3aPython <2.7 compat
Christophe de Vienne
2012-11-07 22:37:35 +01:00
c5d74a3353Python 3 compat
Christophe de Vienne
2012-11-07 21:56:27 +01:00
74bb6b0bc3Remove the parse_arg tests (parse_arg does not exist anymore), fix the json nest_result option handling, and fix the encode_sample tests and implementations.
Christophe de Vienne
2012-11-07 21:29:46 +01:00
c3891c477eRework the rest implementation. We now have a single protocol that can manupulate different dataformat thanks to the helpers provided by the xml, json and args modules (which will be used by the adapters too). Some corner cases still don't pass the unittest, and some code cleaning is required.
Christophe de Vienne
2012-11-07 18:19:11 +01:00
eaa6cc8083Add a test for the pecan adapter
Christophe de Vienne
2012-11-06 22:37:33 +01:00
ddd2ba251eMove around the REST implementation : wsme.protocols.commons -> wsme.rest.args, wsme.protocols.rest -> wsme.rest.protocol, wsme.protocols.restxml/json -> wsme.rest.xml/json, wsme.protocols.__init__ -> wsme.protocol.
Christophe de Vienne
2012-11-06 22:34:03 +01:00
4826c8b7edStart working on a better tg 1.1 integration. Need to rework the rest implementation to make it easier (especially the body parsing)
Christophe de Vienne
2012-11-05 23:35:45 +01:00
3080528319Don't use wsme.release anymore
Christophe de Vienne
2012-11-05 22:12:20 +01:00
c8b0b3b7a6Change version to avoid dependencies problems in the CI
Christophe de Vienne
2012-10-31 16:02:05 +01:00
b12a25a816Make DummyProtocol inherit from Protocol because it now needs a 'iter_routes' function
Christophe de Vienne
2012-10-31 12:23:31 +01:00
d3b6268720wsme.protocols.expose now accept templated paths, and can expose a single function several times
Christophe de Vienne
2012-10-31 12:09:48 +01:00
21b5ccc632Introduce a new decoratore wsme.protocol.expose, which replaces the clumsy former pexpose
Christophe de Vienne
2012-10-31 11:44:30 +01:00
4747aa82f1Reorganise the decorators. expose and validate are now in wsme.rest, and ws.api.signature becomes the raw decorator to declare a function signature. Got rid of the 'pexpose' decorator, which will be replaced later by a better way.
Christophe de Vienne
2012-10-31 10:48:01 +01:00
983ba099d7The pecan adapter is now tested
Christophe de Vienne
2012-10-26 14:56:32 +02:00
e19613fd32Make json the default format
Christophe de Vienne
2012-10-26 14:53:47 +02:00
d282fda305Rename WSRoot.scan_api to WSRoot._scan_api to avoid infinite recursion by scan_api
Christophe de Vienne
2012-10-26 11:43:40 +02:00
21ea8a9b17Start working on adding protocols when used as a cornice complement
Christophe de Vienne
2012-10-25 21:35:08 +02:00
e4b852292fCornice extension: Fix function args preparation, and choose the renderer based on the 'Accept' header
Christophe de Vienne
2012-10-24 21:17:59 +02:00
0b2cf8df04Adapter for cornice
Christophe de Vienne
2012-10-23 12:28:48 +02:00
61b3d3d88cSplit get_args in several functions to make adapters implementation easier
Christophe de Vienne
2012-10-23 12:22:14 +02:00
b45a949b79Add a paramter 'multiple_expose' to the expose decorator
Christophe de Vienne
2012-10-16 14:51:11 +02:00
31b5e0d23dmerge
Christophe de Vienne
2012-10-16 13:45:38 +02:00
4cab7ad256Added tag 0.4 for changeset f06e004ca8e4
Christophe de Vienne
2012-10-16 13:12:42 +02:00
ac93de57c7Add a test for one item long text arrays
0.4
Christophe de Vienne
2012-10-16 11:12:11 +02:00
4cf7c1cc4eGet WSME version from the package, not wsme.release
Christophe de Vienne
2012-10-15 16:31:25 +02:00
5a7b305674Update the changelog
Christophe de Vienne
2012-10-15 16:01:59 +02:00
eb96b04822Fix the sample include line numbers
Christophe de Vienne
2012-10-15 16:00:57 +02:00
179126dba6Remove the b1 tag, 0.4 is about to be released
Christophe de Vienne
2012-10-15 15:51:33 +02:00
16d09b37daMove the imports to avoid cross-import problems (all this needs some rework)
Christophe de Vienne
2012-10-15 14:30:46 +02:00
318c6d6b83Add a default value to FunctionDefinition.body_type
Christophe de Vienne
2012-10-15 14:29:56 +02:00
f081d8a370Rest protocols can now take parameters from url + a parameter from the body by adding a parameter body= to expose()
Christophe de Vienne
2012-10-15 14:03:35 +02:00
0f0116be78Add an adapter for pecan.
Christophe de Vienne
2012-10-14 01:40:27 +02:00
a5e63f0aedAdd a helper function for adapters that need to convert a function arguments
Christophe de Vienne
2012-10-14 01:39:19 +02:00
5a840a4bd8Get rid of the function wrapper. The only case it was needed is for exposing a function several times, but this case can be handled differently. I may reintroduce it as an option.
Christophe de Vienne
2012-10-13 21:14:26 +02:00
97f1b197ceIntroduce a new decorator: 'sig', which combines expose and validate in a single decorator.
Christophe de Vienne
2012-10-13 21:08:17 +02:00
7cad370657Now use six.with_metaclass to create the Base type in a python 2/3 compatible way
Christophe de Vienne
2012-10-06 21:18:05 +02:00
be16f84738spore.getdesc does not take a request anymore but only the host url (it makes the tests simplier)
Christophe de Vienne
2012-09-24 22:10:10 +02:00
9d03f6f1f1Add a little demo of a SPORE client to call a function of the demo program
Christophe de Vienne
2012-09-23 16:17:28 +02:00
a02b367a90Fix the spore 'base_url' attribute
Christophe de Vienne
2012-09-23 16:16:51 +02:00
740cbea766Fix the request headers log
Christophe de Vienne
2012-09-23 16:16:27 +02:00
db45239e05Test SPORE crud function descriptions
Christophe de Vienne
2012-09-22 22:53:45 +02:00
2f75b3dd61Python 3 compat
Christophe de Vienne
2012-09-22 22:53:11 +02:00
0f5aeeedd5Fix the spore test, as some functions were added by restjson
Christophe de Vienne
2012-09-22 22:47:31 +02:00
9605e9eaaeInitial implementation of SPORE description of the api (fetch /api.spore to get it)
Christophe de Vienne
2012-09-22 22:30:56 +02:00
eb58bd2280Fix test_default_usertype
Christophe de Vienne
2012-09-19 23:14:29 +02:00
a80f3af917Test text to bytes auto-conversion
Christophe de Vienne
2012-09-19 23:13:56 +02:00
81ebb79e66text and bytes attributes now convert values from/to bytes/text when needed (ascii only conversion)
Christophe de Vienne
2012-09-19 23:10:00 +02:00
5258fd3cc5Remove the now useless test_release (the release module was removed)
Christophe de Vienne
2012-09-17 23:33:28 +02:00
e295d01c16Still need to specify the requires int the setup.py, as d2to1 does not seem to handle python_version dependant metadata
Christophe de Vienne
2012-09-17 23:25:13 +02:00
8d61bd983eNow using d2to1, which simplifies a lot the setup.py
Christophe de Vienne
2012-09-17 23:03:19 +02:00
b4090ee562Added tag 0.4b1 for changeset 5ad01afed877
Christophe de Vienne
2012-09-14 15:38:17 +02:00
cc1192b6d9Update the change log (preparing release 0.4b1
0.4b1
Christophe de Vienne
2012-09-14 11:32:02 +02:00
3d27316575To avoid any array or dict duplication, use set() instead of list() for the registry array_types and dict_types attributes
Christophe de Vienne
2012-09-14 10:54:10 +02:00
110db71c8eFix ArrayType __eq__ operator so that array types are not duplicated in the registry.
Christophe de Vienne
2012-09-14 10:49:04 +02:00
1512c3902fAdd more list corner cases to test the soap behavior with empty arrays
Christophe de Vienne
2012-09-13 23:13:41 +02:00
b8de4600e0Allow 'None' to be set on an Array attribute
Christophe de Vienne
2012-09-13 23:07:16 +02:00
39e5762873Mention the new wsme.types.Base type in the changelog
Christophe de Vienne
2012-09-13 22:27:40 +02:00
8d376b1574Fix the demo so that we can use the soap client again, and changed the function names in the client (the soap function naming scheme just changed)
Christophe de Vienne
2012-09-07 15:32:15 +02:00
d04f10c835Fix the array and dict registering. The register() function has to be rethought, as resolve_type is doing more, and the ArrayType and DictType are in the game.
Christophe de Vienne
2012-09-07 15:29:15 +02:00
150dbd2de8Mention the wsme.wsgi replacement by wsme.WSRoot.wsgiapp in the changelog
Christophe de Vienne
2012-08-24 18:05:32 +02:00
4d9a539086Python 3 compatibility
Christophe de Vienne
2012-08-24 12:09:55 +02:00
b49f992d1dFix the Enum constructor, and document the change
Christophe de Vienne
2012-08-24 10:45:58 +02:00
3ada92fbf1Documents the File type
Christophe de Vienne
2012-08-24 10:37:08 +02:00
f1eedeed19Rename FileType to File, and make it a complex type instead of a native one.
Christophe de Vienne
2012-08-24 10:05:06 +02:00
2ec135137dRest protocols should now accept multipart/form-data posts (see issue #4)
Christophe de Vienne
2012-08-23 23:25:21 +02:00
3f3b0a08dfNew type: FileType. Supports file inputs in forms + documents and demonstrate it in the demo. Should solve issue #4.
Christophe de Vienne
2012-08-23 23:22:44 +02:00
53669cb935Mention wsme.types.Base
Christophe de Vienne
2012-08-18 00:48:55 +02:00