Skip to content

Commit

Permalink
renamed license type to license name #59
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Jul 25, 2014
1 parent b394e19 commit dcfe72a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/mads/petstore-expanded.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"url": "http://madskristensen.net"
},
"license": {
"type": "MIT",
"name": "MIT",
"url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT"
}
},
Expand Down
2 changes: 1 addition & 1 deletion examples/mads/petstore-simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "Wordnik API Team"
},
"license": {
"type": "MIT"
"name": "MIT"
}
},
"host": "http://petstore.swagger.wordnik.com/api",
Expand Down
10 changes: 9 additions & 1 deletion examples/wordnik/petstore.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"swagger": 2.0,
"info": {
"version": "1.0.0",
"title": "Swagger Petstore"
"title": "Swagger Petstore",
"contact": {
"name": "wordnik api team",
"url": "http://developer.wordnik.com"
},
"license": {
"name": "Creative Commons 4.0 International",
"url": "http://creativecommons.org/licenses/by/4.0/"
}
},
"host": "http://petstore.swagger.wordnik.com",
"basePath": "/api",
Expand Down
2 changes: 1 addition & 1 deletion samples/v2.0/json/resources/commonParameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "http://developer.wordnik.com"
},
"license": {
"type": "Creative Commons 4.0 International",
"name": "Creative Commons 4.0 International",
"url": "http://creativecommons.org/licenses/by/4.0/"
}
},
Expand Down
2 changes: 1 addition & 1 deletion samples/v2.0/json/resources/stringPathParamResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "http://developer.wordnik.com"
},
"license": {
"type": "Creative Commons 4.0 International",
"name": "Creative Commons 4.0 International",
"url": "http://creativecommons.org/licenses/by/4.0/"
}
},
Expand Down
2 changes: 1 addition & 1 deletion samples/v2.0/json/resources/vendorExtensionExamples.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "http://developer.wordnik.com"
},
"license": {
"type": "Creative Commons 4.0 International",
"name": "Creative Commons 4.0 International",
"url": "http://creativecommons.org/licenses/by/4.0/"
}
},
Expand Down
8 changes: 4 additions & 4 deletions schemas/v2.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"info": {
"type": "object",
"description": "General information about the API.",
"required": [ "version", "title" ],
"required": [ "version", "title", "contact", "license" ],
"additionalProperties": false,
"patternProperties": {
"^x-": {
Expand Down Expand Up @@ -57,12 +57,12 @@
},
"license": {
"type": "object",
"required": [ "type" ],
"required": [ "name" ],
"additionalProperties": false,
"properties": {
"type": {
"name": {
"type": "string",
"description": "The name of the type of license. It's encouraged to use an OSI compatible license."
"description": "The name of the license type. It's encouraged to use an OSI compatible license."
},
"url": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/TestBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import scala.io.Source
**/
trait TestBase {
val mapper = new ObjectMapper
val host = "https://raw.githubusercontent.com/reverb/swagger-spec/master/schemas/v2.0/schema.json"
// val host = "http://localhost:8000/schema.json"
// val host = "https://raw.githubusercontent.com/reverb/swagger-spec/master/schemas/v2.0/schema.json"
val host = "http://localhost:8000/schema.json"

def readSchema(makeQualified: Boolean = true) = {
val json = Source.fromFile("schemas/v2.0/schema.json").getLines
Expand Down

0 comments on commit dcfe72a

Please sign in to comment.