From 80eb15c481be11dca3033db94729f0f8564d394f Mon Sep 17 00:00:00 2001 From: Nicolas Mengin Date: Wed, 12 Jun 2024 18:02:03 +0200 Subject: [PATCH] Fix indentation --- api-gateway/1-getting-started/README.md | 12 ++++++------ api-management/1-getting-started/README.md | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/api-gateway/1-getting-started/README.md b/api-gateway/1-getting-started/README.md index 6bb97df..0fa1768 100644 --- a/api-gateway/1-getting-started/README.md +++ b/api-gateway/1-getting-started/README.md @@ -65,7 +65,7 @@ kubectl apply -f src/kind/metallb-config.yaml -## Step 1: Install Traefik Hub API Gateway +### Step 1: Install Traefik Hub API Gateway Log in to the [Traefik Hub Online Dashboard](https://hub.traefik.io), open the page to [generate a new agent](https://hub.traefik.io/agents/new). @@ -124,7 +124,7 @@ helm upgrade traefik-hub -n traefik-hub --wait \ Now, we can access the local dashboard: http://dashboard.docker.localhost/ -## Step 2: Deploy an API as an Ingress +### Step 2: Deploy an API as an Ingress Without Traefik Hub API Gateway, an API can be deployed as an `Ingress`, an `IngressRoute` or an `HTTPRoute`. @@ -189,7 +189,7 @@ curl http://api.docker.localhost/weather } ``` -## Step 3: Secure authentication on this API with Traefik Hub +### Step 3: Secure authentication on this API with Traefik Hub Let's secure the weather API with an API Key. @@ -283,7 +283,7 @@ git clone https://github.com/traefik/hub.git cd hub ``` -## Step 1: Install Traefik Hub API Gateway +### Step 1: Install Traefik Hub API Gateway Get the Traefik Hub API Gateway binary: @@ -360,7 +360,7 @@ sudo systemctl status traefik-hub.service [...] systemd[1]: Started traefik-hub.service - Traefik Hub. ``` -## Step 2: Expose an API +### Step 2: Expose an API :information_source: On Linux, we can use all the providers supported by Traefik Proxy and Traefik Hub API Gateway. @@ -455,7 +455,7 @@ X-Forwarded-Server: ip-172-31-26-184 X-Real-Ip: 127.0.0.1 ``` -## Step 3: Secure the access using an API Key +### Step 3: Secure the access using an API Key Let's secure the access with an API Key. diff --git a/api-management/1-getting-started/README.md b/api-management/1-getting-started/README.md index dd8d8af..1fd8d1d 100644 --- a/api-management/1-getting-started/README.md +++ b/api-management/1-getting-started/README.md @@ -345,13 +345,15 @@ curl -H "Authorization: Bearer $ADMIN_TOKEN" http://api.docker.localhost/weather } ``` -:information_source: If it fails with 401, just wait one minute and try again. The token needs to be sync before it can be accepted by Traefik Hub. +:information_source: If it fails with 401, wait a minute and try again. The token needs to be sync before it can be accepted by Traefik Hub. We can see the API available in the `apps` namespace in the portal. This first API does not come with an OpenAPI specification (OAS): ![API Portal without OAS](./images/api-portal-without-oas.png) -Although not setting an OAS for an API is possible, it severely hurts getting started with API consumption. Let's see what features are unlocked if we set one. Let's deploy a [forecast app](https://github.com/traefik/hub-preview/blob/main/src/manifests/weather-app-forecast.yaml) with an OpenAPI specification: +Although not setting an OAS for an API is possible, it severely hurts getting started with API consumption. +Let's see what features are unlocked if we set one. +Let's deploy a [forecast app](https://github.com/traefik/hub-preview/blob/main/src/manifests/weather-app-forecast.yaml) with an OpenAPI specification: ```shell kubectl apply -f src/manifests/weather-app-forecast.yaml @@ -389,4 +391,3 @@ ingressroute.traefik.io/weather-api-forecast created And that's it! This time, we have documentation built from the OpenAPI specification, and we can also interactively try the API with the Try Out functionality. ![API Portal With OAS](./images/api-portal-with-oas.png) -