The "API" button from the details page of a Controlled Vocabulary should take the user to the api-docs page, where the swagger-ui of the OAS3 is presented, with indication of what the values are for agency_id and key_concept for the given CV, and where to use them in the API.
Current behaviour
The "API" button from the details page of a Controlled Vocabulary points to the REST API endpoint for retrieving the list of entries in the given vocabulary. The browser will perform the call and render the JSON content in a new tab.
Proposed solution
The api-docs page could extract the CV's IRI from a query-param, to determine whether to show additional contextual information in the introductory text (see #116).
The text could read something like
In the case of the , you should use the /vocabularies/{agency_id}/{key_concept} API, where you can use for agency_id and for key_concept.
This is what the URL will look like: .
To retrieve the details, the api-docs page should issue a call to the already existing backend API for the details. The returned details include title, agencyId, keyConcept and endpointUrl to be used in the previously drafted message.
Expected behaviour
The "API" button from the details page of a Controlled Vocabulary should take the user to the api-docs page, where the swagger-ui of the OAS3 is presented, with indication of what the values are for
agency_id
andkey_concept
for the given CV, and where to use them in the API.Current behaviour
The "API" button from the details page of a Controlled Vocabulary points to the REST API endpoint for retrieving the list of entries in the given vocabulary. The browser will perform the call and render the JSON content in a new tab.
Proposed solution
The api-docs page could extract the CV's IRI from a query-param, to determine whether to show additional contextual information in the introductory text (see #116). The text could read something like
To retrieve the details, the api-docs page should issue a call to the already existing backend API for the details. The returned details include
title
,agencyId
,keyConcept
andendpointUrl
to be used in the previously drafted message.