Changes for page ERRest In Depth

Last modified by Pascal Robert on 2012/06/10 16:01

From version 22.1
edited by Pascal Robert
on 2012/05/02 16:16
Change comment: There is no comment for this version
To version 29.1
edited by Pascal Robert
on 2012/05/29 08:27
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -17,14 +17,18 @@
17 17  *
18 18  ** you just need to override createRestContext() in your controller if you want to add other stuff to the context (a user, etc.)
19 19  * Properties
20 -** ERXRest.idKey
21 -** ERXRest.typeKey
22 -** ERXRest.nilKey
23 -** ERXRest.writeNilKey
24 -** ERXRest.pluralEntityNames
25 -** ERXRest.writeTypeKey
26 -** ERXRest.suppressTypeAttributesForSimpleTypes
20 +** ERXRest.idKey (ERXRestFormatDelegate)
21 +*** (default "id") Override this property if you want to use a different key for the 'id' attribute** ERXRest.typeKey**
22 +** ERXRest.nilKey (ERXRestFormatDelegate)
23 +** ERXRest.writeNilKey (ERXRestFormatDelegate)
24 +** ERXRest.pluralEntityNames (ERXRestFormatDelegate)
25 +** ERXRest.writeTypeKey (ERXRestFormatDelegate)
26 +** ERXRest.suppressTypeAttributesForSimpleTypes (ERXXmlRestWriter)
27 +*** (default "false") If set to true, primitive types, like type = "datetime", won't be added to the output
27 27  ** ERXRest.strictMode
29 +*** In ERXMissingRouteController: (default "true") If set to true, status code in the response will be 405 Not Allowed, if set to false, status code will be 404 Not Found
30 +*** In ERXRouteController: (default "true") If set to true, status code in the response will be 405 Not Allowed, if set to false, status code will be 404 Not Found
31 +*** ERXRouteResults: (default "true") If set to true, creating a ressource will return status code 201 Created, if set to false, will return 200 OK
28 28  ** ERXRest.pluralEntityNames (ERXRouteRequestHandler)
29 29  ** ERXRest.routeCase (ERXRouteRequestHandler)
30 30  ** ERXRest.lowercaseEntityNames (ERXRouteRequestHandler)
... ... @@ -42,8 +42,18 @@
42 42  ** er.rest.timestampFormat.secondary
43 43  ** er.rest.timestampFormatter
44 44  ** er.rest.rfcDateFormat
45 -** ERXRest.transactionsEnabled
46 -** ERXRest.maxEventsPerTransaction
49 +** er.rest.jodaTime
50 +** ERXRest.transactionsEnabled (default 'false') ERXRestTransactionRequestAdaptor
51 +** ERXRest.maxEventsPerTransaction (default '50') ERXRestTransactionRequestAdaptor
52 +** ERXRest.accessControlAllowRequestHeaders (ERXRouteController)
53 +** ERXRest.accessControlAllowRequestMethods (ERXRouteController)
54 +** ERXRest.defaultFormat (ERXRouteController)
55 +*** (default "xml") Allow you to set the default format for all of your REST controllers
56 +** ERXRest.allowWindowNameCrossDomainTransport (ERXRouteController)
57 +** ERXRest.accessControlMaxAge (ERXRouteController)
58 +*** (default 1728000) This header indicates how long the results of a preflight request can be cached. For an example of a preflight request, see the above examples.
59 +** ERXRest.accessControlAllowOrigin (ERXRouteController)
60 +*** Set the value to '**' to enable all origins. See [[https://developer.mozilla.org/En/HTTP_access_control#Access-Control-Allow-Origin]]**
47 47  * JSON Schema
48 48  ** {{code}}
49 49  /something?schema=true
... ... @@ -56,7 +56,8 @@
56 56   return request().stringFormValueForKey("schema") != null;
57 57  }
58 58  {{/code}}
59 -* Same Origin policy
73 +
74 +Same Origin policy
60 60  Transactions
61 61  HTML vs other formats
62 62  Response representation