Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #111 from apiaryio/kylef/fury
Browse files Browse the repository at this point in the history
Support Fury 3.0.0-beta.3 and minim 0.18.0
  • Loading branch information
kylef authored Jul 11, 2017
2 parents d78a370 + efe74f0 commit add4b65
Show file tree
Hide file tree
Showing 14 changed files with 1,009 additions and 413 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.12.0

- Updates to fury 3.0.0-beta.3 which supports Refract 1.0 serialisation
rules.

# 0.12.0-beta.3

- Updates to fury 3.0.0-beta.2.
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fury-adapter-swagger",
"version": "0.12.0-beta.3",
"version": "0.12.0",
"description": "Swagger 2.0 parser for Fury.js",
"main": "./lib/adapter.js",
"tonicExampleFilename": "tonic-example.js",
Expand All @@ -25,15 +25,18 @@
"yaml-js": "^0.1.5",
"media-typer": "^0.3.0"
},
"peerDependencies": {
"fury": "3.0.0-beta.3"
},
"devDependencies": {
"babel-plugin-array-includes": "^2.0.3",
"chai": "^3.2.0",
"fury": "3.0.0-beta.2",
"fury": "3.0.0-beta.3",
"glob": "^7.1.1",
"minim": "^0.17.1",
"minim-parse-result": "^0.6.1",
"minim": "^0.18.0",
"minim-parse-result": "^0.7.0",
"peasant": "^1.1.0",
"swagger-zoo": "2.3.1"
"swagger-zoo": "2.4.0"
},
"engines": {
"node": ">=4"
Expand Down
78 changes: 54 additions & 24 deletions test/fixtures/ast-path-with-reference-sibling.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,63 @@
{
"element": "annotation",
"meta": {
"classes": [
"error"
],
"links": [
{
"element": "link",
"attributes": {
"relation": "origin",
"href": "http://docs.apiary.io/validations/swagger#swagger-validation"
},
"content": []
}
]
"classes": {
"element": "array",
"content": [
{
"element": "string",
"content": "error"
}
]
},
"links": {
"element": "array",
"content": [
{
"element": "link",
"attributes": {
"relation": {
"element": "string",
"content": "origin"
},
"href": {
"element": "string",
"content": "http://docs.apiary.io/validations/swagger#swagger-validation"
}
},
"content": []
}
]
}
},
"attributes": {
"code": 4,
"sourceMap": [
{
"element": "sourceMap",
"content": [
[
247,
0
"code": {
"element": "number",
"content": 4
},
"sourceMap": {
"element": "array",
"content": [
{
"element": "sourceMap",
"content": [
{
"element": "array",
"content": [
{
"element": "number",
"content": 247
},
{
"element": "number",
"content": 0
}
]
}
]
]
}
]
}
]
}
},
"content": "Expected type string but found type null"
}
Expand Down
153 changes: 105 additions & 48 deletions test/fixtures/circular-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,59 @@
{
"element": "category",
"meta": {
"classes": [
"api"
],
"title": "Test circular reference in example"
"classes": {
"element": "array",
"content": [
{
"element": "string",
"content": "api"
}
]
},
"title": {
"element": "string",
"content": "Test circular reference in example"
}
},
"attributes": {
"meta": [
{
"element": "member",
"meta": {
"classes": [
"user"
]
},
"content": {
"key": {
"element": "string",
"content": "HOST"
"meta": {
"element": "array",
"content": [
{
"element": "member",
"meta": {
"classes": {
"element": "array",
"content": [
{
"element": "string",
"content": "user"
}
]
}
},
"value": {
"element": "string",
"content": "petstore.swagger.io"
"content": {
"key": {
"element": "string",
"content": "HOST"
},
"value": {
"element": "string",
"content": "petstore.swagger.io"
}
}
}
}
]
]
}
},
"content": [
{
"element": "resource",
"attributes": {
"href": "/"
"href": {
"element": "string",
"content": "/"
}
},
"content": [
{
Expand All @@ -47,7 +68,10 @@
{
"element": "httpRequest",
"attributes": {
"method": "GET"
"method": {
"element": "string",
"content": "GET"
}
},
"content": []
},
Expand All @@ -72,7 +96,10 @@
}
]
},
"statusCode": "200"
"statusCode": {
"element": "string",
"content": "200"
}
},
"content": [
{
Expand All @@ -92,33 +119,63 @@
{
"element": "annotation",
"meta": {
"classes": [
"warning"
],
"links": [
{
"element": "link",
"attributes": {
"relation": "origin",
"href": "http://docs.apiary.io/validations/swagger#refract-not-supported"
},
"content": []
}
]
"classes": {
"element": "array",
"content": [
{
"element": "string",
"content": "warning"
}
]
},
"links": {
"element": "array",
"content": [
{
"element": "link",
"attributes": {
"relation": {
"element": "string",
"content": "origin"
},
"href": {
"element": "string",
"content": "http://docs.apiary.io/validations/swagger#refract-not-supported"
}
},
"content": []
}
]
}
},
"attributes": {
"code": 3,
"sourceMap": [
{
"element": "sourceMap",
"content": [
[
231,
88
"code": {
"element": "number",
"content": 3
},
"sourceMap": {
"element": "array",
"content": [
{
"element": "sourceMap",
"content": [
{
"element": "array",
"content": [
{
"element": "number",
"content": 231
},
{
"element": "number",
"content": 88
}
]
}
]
]
}
]
}
]
}
},
"content": "Circular references in examples are not yet supported."
}
Expand Down
Loading

0 comments on commit add4b65

Please sign in to comment.