← Back to team overview

dhis2-devs-core team mailing list archive

Re: API Versioning

 

No, basically it means "make no change", so a request mapping on
/api/dataElements would not be modified. Maybe not a very descriptive name,
but I think we can remove this in the future (we should do our best to move
clients over to /api/XX/endpoint).

We also have ALL, which means all available versions (but not including
default).

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Wed, May 25, 2016 at 2:10 PM, Lars Helge Øverland <lars@xxxxxxxxx> wrote:

> Sounds great.
>
> What does Version.DEFAULT refer to? Is the latest version?
>
> On Wed, May 25, 2016 at 3:55 AM, Morten Olav Hansen <morten@xxxxxxxxx>
> wrote:
>
>> Just a minor update. The annotation has been renamed from @Api =>
>> @ApiVersion, and it now supports both include and exclude.
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Tue, May 24, 2016 at 12:13 PM, Morten Olav Hansen <morten@xxxxxxxxx>
>> wrote:
>>
>>> Hi everyone
>>>
>>> I have now introduced API versioning in the web-api, for now, all our
>>> endpoints are mapped to /, /23 and /24, which means that your clients
>>> already can target 2.24 specifically.
>>>
>>> I think we need a more fine tuned approach to this, and it is something
>>> maybe we can discuss at the dev call tomorrow.
>>>
>>> Please be aware that we are not introducing DTOs in this release, so
>>> changes to the domain layer will affect -all- versions of the API (unless
>>> we are using DTOs as is the case for tracker), and yes, this includes the
>>> exported schema.
>>>
>>> The annotation used is called @Api, and can be applied both to types and
>>> methods, for now the controllers are type annotated with:
>>> @Api( { Api.Version.DEFAULT, Api.Version.ALL } )
>>>
>>> Which means all available versions + default (which is just /). In many
>>> ways, the default could also be called legacy (we probably want people to
>>> only target specific API versions in the future).
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>
>>
>> --
>> Mailing list: https://launchpad.net/~dhis2-devs-core
>> Post to     : dhis2-devs-core@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs-core
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> lars@xxxxxxxxx
> http://www.dhis2.org <https://www.dhis2.org/>
>
>

References