I'm using IBM's APIConnect to create a few APIs. I've been trying to edit my API's YAML definition to create references to properties so that I can externalize them. But so far, I'v been encountering problems with the referencing. They either do not validate against "API Connect swagger extensions schema API definition" or against "IBM Swagger Version 2.0 schema API definition".

Here are the two referencing I tried:-

1. Referencing securityDefinitions:
As described in the IBM website: <https://www.ibm.com/support/knowledgecenter/en/SSMNED_5.0.0/com.ibm.apic.toolkit.doc/rapic_swagger_ref_fragment.html>

my YAML:-

```
swagger: '2.0'
info:
  version: 1.0.0
  title: PokemonApp
  x-ibm-name: pokemonapp
host: $(catalog.host)
basePath: /api
paths:
  /pokemon:
    get:
      responses:
        '200':
          description: 200 OK
securityDefinitions:
    $ref: ./schemas/ClientID.yaml
security:
  - clientID: []
x-ibm-configuration:
  assembly:
    execute:
      - invoke:
          target-url: $(TestProperty)
  properties:
    TestProperty:
        value: 'https://pokemons.mybluemix.net/api/pokemons'
        description: ''
        encoded: false
  gateway: micro-gateway

```

And it's corresponding reference file:-

```
clientID:
    description: ''
    in: query
    name: client_id
    type: apiKey

```

On doing an apic validate on the parent YAML, I get the following error:-

```
C:\Users\MyName\TestNotes\definitions>apic validate pokemonapp_1.0.0.yaml
Successfully validated pokemonapp_1.0.0.yaml against Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
Successfully validated pokemonapp_1.0.0.yaml against API Connect swagger extensions schema API definition [pokemonapp:1.0.0].
Error validating pokemonapp_1.0.0.yaml with IBM Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
  Data does not match any schemas from "oneOf" (/securityDefinitions/$ref)
Error: Validation did not complete successfully.

```

2. Referencing properties:-

Here's the parent YAML:-

```
swagger: '2.0'
info:
  version: 1.0.0
  title: PokemonApp
  x-ibm-name: pokemonapp
host: $(catalog.host)
basePath: /api
paths:
  /pokemon:
    get:
      responses:
        '200':
          description: 200 OK
securityDefinitions:
    clientID:
        description: ''
        in: query
        name: client_id
        type: apiKey
security:
  - clientID: []
x-ibm-configuration:
  assembly:
    execute:
      - invoke:
          target-url: $(TestProperty)
  properties:
    $ref: ./schemas/properties.yaml
  gateway: micro-gateway

```

And the corresponding reference file (./schemas/properties.yaml):-

```
TestProperty:
    type: object
    value: 'https://pokemons.mybluemix.net/api/pokemons'
    description: ''
    encoded: false

```

On validating this, the error is a different one. This YAML validates against Swagger Version 2.0 schema API definition and against IBM Swagger Version 2.0 schema API definition, but not against API Connect swagger extensions schema API definition.

Here's the error message:-

```
C:\Users\MyName\TestNotes\definitions>apic validate pokemonapp_1.0.0.yaml
Successfully validated pokemonapp_1.0.0.yaml against Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
Error validating pokemonapp_1.0.0.yaml with API Connect swagger extensions schema API definition [pokemonapp:1.0.0].
  Invalid type: string (expected object) (/properties/$ref)
Successfully validated pokemonapp_1.0.0.yaml against IBM Swagger Version 2.0 schema API definition [pokemonapp:1.0.0].
Error: Validation did not complete successfully.

```

Anu idea what I'm doing wrong here?
P.S. in both the cases, the swagger validates against 'Swagger Version 2.0 schema API definition'. It's only against the IBM specific schemas that they don't.