Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rickymoorhouse
Created July 1, 2021 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickymoorhouse/ca40eedda469c0791b6804da45412c4a to your computer and use it in GitHub Desktop.
Save rickymoorhouse/ca40eedda469c0791b6804da45412c4a to your computer and use it in GitHub Desktop.
Example API to trigger the compilation of the validation configuration across k8s gateways
swagger: '2.0'
info:
title: API Validate Warm
x-ibm-name: api-validate-warm
version: 1.0.0
schemes:
- https
basePath: /validation
x-ibm-configuration:
cors:
enabled: true
gateway: datapower-api-gateway
type: rest
phase: realized
enforced: true
testable: true
assembly:
execute:
- invoke:
title: invoke
version: 2.0.0
verb: POST
target-url: >-
https://r6d0b871026-dynamic-gateway-service-0.r6d0b871026-dynamic-gateway-service.apic-gateway.svc:9443/$(validation-path)
follow-redirects: false
timeout: 60
parameter-control:
type: blacklist
values: []
header-control:
type: blacklist
values: []
inject-proxy-headers: true
tls-profile: 'no-checking:1.0.0'
output: gw0
- invoke:
title: invoke
version: 2.0.0
verb: POST
target-url: >-
https://r6d0b871026-dynamic-gateway-service-1.r6d0b871026-dynamic-gateway-service.apic-gateway.svc:9443/$(validation-path)
follow-redirects: false
timeout: 60
parameter-control:
type: blacklist
values: []
header-control:
type: blacklist
values: []
inject-proxy-headers: true
tls-profile: 'no-checking:1.0.0'
output: gw1
- invoke:
title: invoke
version: 2.0.0
verb: POST
target-url: >-
https://r6d0b871026-dynamic-gateway-service-2.r6d0b871026-dynamic-gateway-service.apic-gateway.svc:9443/$(validation-path)
follow-redirects: false
timeout: 60
parameter-control:
type: blacklist
values: []
header-control:
type: blacklist
values: []
inject-proxy-headers: true
tls-profile: 'no-checking:1.0.0'
output: gw2
- map:
version: 2.0.0
title: map
inputs:
input:
schema:
type: object
variable: gw0.body
input_1:
schema:
type: object
variable: gw1.body
input_2:
schema:
type: object
variable: gw2.body
outputs:
output:
schema:
type: object
properties:
gw0:
type: string
name: gw0
gw1:
type: string
name: gw1
gw2:
type: string
name: gw2
variable: message.body
actions:
- set: output.gw0
from: input
- set: output.gw1
from: input_1
- set: output.gw2
from: input_2
application-authentication:
certificate: false
properties:
validation-path:
value: ricky/sandbox/simple-validate/validate
catalogs: {}
paths:
/prewarm:
post:
responses:
'200':
description: success
schema:
type: string
parameters:
- name: validation-object
in: body
required: false
schema:
type: object
consumes: []
produces: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment