swagger: '2.0'

info:
  x-ibm-name: {{name}}
  title: {{{title}}}
  version: {{version}}

schemes:
{{#if schemes}}
  {{#each schemes}}
    - {{this}}
  {{/each}}
{{else}}
    - https
{{/if}}
host: {{#if hostname}}{{hostname}}{{else}}$(catalog.host){{/if}}
basePath: {{#if basepath}}{{basepath}}{{else}}/{{/if}}

consumes:
  - application/json
produces:
  - application/json

securityDefinitions:{{#if clientId}}
 clientIdHeader:
   type: apiKey
   in: header
   name: X-IBM-Client-Id
  {{#if clientSecret}}
 clientSecretHeader:
   type: apiKey
   in: header
   name: X-IBM-Client-Secret
  {{/if}}
{{else}}
 {}
{{/if}}

security:{{#if clientId}}
 - clientIdHeader: []
  {{#if clientSecret}}
 - clientSecretHeader: []
  {{/if}}
{{else}}
 []
{{/if}}

x-ibm-configuration:
  testable: true
  enforced: true
  cors:
    enabled: {{#if cors}}true{{else}}false{{/if}}
  assembly:
    execute:
      - invoke:
        {{#if targeturl}}
          target-url: {{targeturl}}
        {{else}}
          target-url: $(target-url)$(request.path)
        {{/if}}
  {{#if gateway}}
  gateway: {{gateway}}
  {{/if}}

paths: {}

definitions: {}

tags: []
