From 202fd7e0990479f34b3a6bfa11ccfc5b56deffbf Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 8 Dec 2023 16:38:03 +0100 Subject: [PATCH] amelioration(doc.api): utilise le bon lien pour la doc des APIs, ajoute le lien sur la section des jetons d'api sur la page profil usager --- .../api_token_card_component/api_token_card_component.en.yml | 3 ++- .../api_token_card_component/api_token_card_component.fr.yml | 3 ++- .../api_token_card_component.html.haml | 3 +-- config/initializers/02_urls.rb | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/components/profile/api_token_card_component/api_token_card_component.en.yml b/app/components/profile/api_token_card_component/api_token_card_component.en.yml index ad5a4a5a3..46cc93677 100644 --- a/app/components/profile/api_token_card_component/api_token_card_component.en.yml +++ b/app/components/profile/api_token_card_component/api_token_card_component.en.yml @@ -1,5 +1,6 @@ en: tokens_title: API identification tokens - first_paragraph: These tokens are needed to make calls to the + first_paragraph_html: | + These tokens are needed to make calls to the API of %{application_name}. You can click on this link to check our documentation second_paragraph: If you already have applications that use a token and you revoke it, access to the API will be blocked for those applications. action: Create and display a new token diff --git a/app/components/profile/api_token_card_component/api_token_card_component.fr.yml b/app/components/profile/api_token_card_component/api_token_card_component.fr.yml index 895e269a1..62f6d3f9b 100644 --- a/app/components/profile/api_token_card_component/api_token_card_component.fr.yml +++ b/app/components/profile/api_token_card_component/api_token_card_component.fr.yml @@ -1,5 +1,6 @@ fr: tokens_title: Jetons d’identification de l’API (token) - first_paragraph: Ces jetons sont nécessaire pour effectuer des appels vers l’API de + first_paragraph_html: | + Ces jetons sont nécessaire pour effectuer des appels vers l’API de %{application_name}. Vous pouvez consulter notre documentation en suivant ce lien second_paragraph: Si vous avez déjà des applications qui utilisent un jeton et vous le révoquez, l’accès à l’API sera bloqué pour ces applications. action: Créer et afficher un nouveau jeton diff --git a/app/components/profile/api_token_card_component/api_token_card_component.html.haml b/app/components/profile/api_token_card_component/api_token_card_component.html.haml index 63c632e1c..063a8cc54 100644 --- a/app/components/profile/api_token_card_component/api_token_card_component.html.haml +++ b/app/components/profile/api_token_card_component/api_token_card_component.html.haml @@ -2,8 +2,7 @@ .card-title = t('.tokens_title') %p - = t('.first_paragraph') - #{APPLICATION_NAME}. + = t('.first_paragraph_html', application_name: APPLICATION_NAME, api_doc_url: API_DOC_URL) %p = t('.second_paragraph') diff --git a/config/initializers/02_urls.rb b/config/initializers/02_urls.rb index 847c1f427..8785f19ce 100644 --- a/config/initializers/02_urls.rb +++ b/config/initializers/02_urls.rb @@ -35,7 +35,7 @@ CGU_URL = ENV.fetch("CGU_URL", [DOC_URL, "cgu"].join("/")) MENTIONS_LEGALES_URL = ENV.fetch("MENTIONS_LEGALES_URL", "/mentions-legales") ACCESSIBILITE_URL = ENV.fetch("ACCESSIBILITE_URL", "/declaration-accessibilite") ROUTAGE_URL = ENV.fetch("ROUTAGE_URL", [DOC_URL, "/pour-aller-plus-loin/routage"].join("/")) -API_DOC_URL = [DOC_URL, "pour-aller-plus-loin", "graphql"].join("/") +API_DOC_URL = [DOC_URL, "api-graphql"].join("/") WEBHOOK_DOC_URL = [DOC_URL, "pour-aller-plus-loin", "webhook"].join("/") ARCHIVAGE_DOC_URL = [DOC_URL, "pour-aller-plus-loin", "archivage-longue-duree-des-demarches"].join("/") DOC_INTEGRATION_MONAVIS_URL = [DOC_URL, "tutoriels", "integration-du-bouton-mon-avis"].join("/")