Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add defaultValue for path param #30

Merged
merged 1 commit into from

2 participants

@jakul

No description provided.

@fehguy fehguy merged commit 3bfdfd6 into swagger-api:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 14, 2013
  1. @jakul

    add defaultValue for path params

    jakul authored
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 3 deletions.
  1. +5 −3 Common/node/paramTypes.js
View
8 Common/node/paramTypes.js
@@ -27,7 +27,7 @@ exports.query = exports.q = function(name, description, dataType, required, allo
};
};
-exports.path = function(name, description, dataType, allowableValues) {
+exports.path = function(name, description, dataType, allowableValues, defaultValue) {
return {
"name" : name,
"description" : description,
@@ -35,7 +35,9 @@ exports.path = function(name, description, dataType, allowableValues) {
"required" : true,
"allowMultiple" : false,
"allowableValues" : allowableValues,
- "paramType" : "path"
+ "paramType" : "path",
+ "defaultValue" : defaultValue
+
};
};
@@ -58,4 +60,4 @@ exports.header = function(name, description, dataType, required) {
"allowMultiple" : false,
"paramType" : "header"
};
-};
+};
Something went wrong with that request. Please try again.