dcsr-datumo / Theatre-de-societe

Project specific ontologies for the project Théatre de société
2 stars 1 forks source link

make sure we only use API v2 #223

Closed loicjaouen closed 1 year ago

loicjaouen commented 1 year ago

v1 will be turned off

loicjaouen commented 1 year ago

code inspection

is v1 mentionned?

https://github.com/search?q=repo%3ALaDHUL%2FTheatre-de-societe%20v1&type=code => no

we can probably stop here, because the doc says that api v1 calls have an url like: http://host/v1/.

Still the v1 can be build outside of our source code scope (env var, local config, thrid party libs).

loicjaouen commented 1 year ago

but let's run the extra mile

lib config

it is assigning the var apiHost, how is it used? does it only leads to an api v2 call?

how is it used?

config doesn't mention api version

used to instanciate knora config here: code

itself used to instanciate knora connection (code)l

Which is systematically used with knoraApiConnection.v2 making v2 calls using v2 internal object, calls would use v1 internal object, which is not the case here.

loicjaouen commented 1 year ago

it is also used to build the URI base of gravsearch: knoraApiConfig.knora.apiHost (code) which hard codes v2

This code is replicated on every call, but systematically.

loicjaouen commented 1 year ago

does it only leads to an api v2 call?

yes, the connection (and therefore calling v2) is systematically used through knora.service.ts

loicjaouen commented 1 year ago

calls and refs outside of the lib

none that a code search can find (on search terms v2, ls-prod, apiHost, knoraApiConnection)

loicjaouen commented 1 year ago

live inspection

How to check? use the app with the dev tools on, filler the calls on v1 and see if something shows up

=> it looks fine

at least, none of the central features are affected