Add curl examples next to go examples (#204)

This commit is contained in:
Janos Dobronszki
2021-09-14 10:32:18 +01:00
committed by GitHub
parent 6cb1a023aa
commit b50d585e02
2 changed files with 34 additions and 0 deletions

View File

@@ -70,3 +70,8 @@ import(
fmt.Println(rsp, err)
}
`
const curlExampleTemplate = `{{ $service := .service }}curl "https://api.m3o.com/v1/{{ $service.Name }}/{{ title .endpoint }}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{{ tsExampleRequest $service.Name .endpoint $service.Spec.Components.Schemas .example.Request }}'`