mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-20 06:25:07 +00:00
Add curl examples next to go examples (#204)
This commit is contained in:
@@ -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 }}'`
|
||||
|
||||
Reference in New Issue
Block a user