Skip to content

Instantly share code, notes, and snippets.

@caryfitzhugh
Last active January 30, 2017 14:27
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 caryfitzhugh/ee2c09cd7ad526bd23e3e1828c508272 to your computer and use it in GitHub Desktop.
Save caryfitzhugh/ee2c09cd7ad526bd23e3e1828c508272 to your computer and use it in GitHub Desktop.
Test!
swagger: "2.0"
info:
title: Test external refs
version: 0.0.0
paths:
/craziness/{complex-id}/:
get:
parameters:
- $ref: "https://gist.githubusercontent.com/caryfitzhugh/ee2c09cd7ad526bd23e3e1828c508272/raw/8f9983a54416d45ae01ab1a30bb434ae1b9b8fdd/test.yml#/parameters/complex-id"
- $ref: "https://gist.githubusercontent.com/caryfitzhugh/ee2c09cd7ad526bd23e3e1828c508272/raw/8f9983a54416d45ae01ab1a30bb434ae1b9b8fdd/test.yml#/parameters/non-complex-id"
responses:
default:
description: who knows
swagger: "2.0"
x-external:
$ref: "https://gist.githubusercontent.com/caryfitzhugh/ee2c09cd7ad526bd23e3e1828c508272/raw/8f9983a54416d45ae01ab1a30bb434ae1b9b8fdd/test.yml"
info:
title: Test external refs
version: 0.0.0
paths:
/craziness/{complex-id}/:
get:
parameters:
- $ref: "#/x-external/parameters/complex-id"
- $ref: "#/x-external/parameters/non-complex-id"
responses:
default:
description: who knows
parameters:
complex-id:
name: complex-id
required: true
in: path
description: a complex id
type: string
pattern: '^(notcomplex.*)$'
non-complex-id:
name: non-complex-id
required: true
in: query
description: a noncomplex id
type: string
pattern: '^(complex.*)$'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment