Re: [Dhis2-devs-core] ApiVersioning redux

2016-06-09 Thread Morten Olav Hansen
Regarding 404 vs 405, that's up to Spring MVC, if there is at least one method mapped at the endpoint, it will usually return 405, if not 404.. I'm looking into this, and adding a few new use-cases to the testing suite -- Morten Olav Hansen Senior Engineer, DHIS 2 University of Oslo http://www.dh

Re: [Dhis2-devs-core] ApiVersioning redux

2016-06-09 Thread Halvdan Hoem Grelland
To be clear: I have a (new) generic controller, as seen below: @Controller @RequestMapping( value = ProgramStageNotificationSchemaDescriptor.API_ENDPOINT ) @ApiVersion( include = { ApiVersion.Version.V24 } ) public class ProgramStageNotificationController extends AbstractCrudController { } D

Re: [Dhis2-devs-core] ApiVersioning redux

2016-06-09 Thread Morten Olav Hansen
Hi Nicolay The main use-case for exclude was to remove versions that was added to the type level, so if you class was annotated with `@ApiVersion(V23, V24)` you could add `@ApiVersion(exclude = V23)` on specific methods. I think it could be added for `ALL` also, it's just not there yet. Let me ha

Re: [Dhis2-devs-core] ApiVersioning redux

2016-06-09 Thread Nicolay Ramm
Hi Morten, this problem surfaced when I added an endpoint for updating custom forms by POSTing json to /api/*/dataSets/{uid}/form This after discussing with Halvdan, I annotated the endpoint with the following version: @ApiVersion( value = ApiVersion.Version.ALL, exclude = ApiVersion.Version.V23

Re: [Dhis2-devs-core] ApiVersioning redux

2016-06-09 Thread Morten Olav Hansen
Hi Halvdan This should be fixed now, the issue was that even though @RequestMapping will default to GET (if not method is set) the annotation doesn't default to GET. I'm now mapping method = {} to method = GET internally, which means that your issues should be gone. I think there will be similar