Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #78 from apiaryio/kylef/minim
Browse files Browse the repository at this point in the history
Update fury/minim
  • Loading branch information
honzajavorek authored Jul 10, 2017
2 parents 50666b1 + f6fdb85 commit fdf2f56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"caseless": "^0.12.0",
"clone": "^2.1.1",
"deckardcain": "^0.3.2",
"fury": "3.0.0-beta.1",
"fury-adapter-apib-parser": "0.3.0",
"fury-adapter-swagger": "^0.11.1",
"fury": "3.0.0-beta.2",
"fury-adapter-apib-parser": "0.7.0",
"fury-adapter-swagger": "0.12.0-beta.3",
"sift": "^3.3.10",
"traverse": "^0.6.6",
"uri-template": "^1.0.0"
Expand Down
10 changes: 5 additions & 5 deletions src/compile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ findRelevantTransactions = (mediaType, parseResult) ->
relevantTransactions.push(httpTransaction) unless httpTransaction.attributes.example is example
else
relevantTransactions.push(httpTransaction)
example = httpTransaction.attributes.example
example = httpTransaction.attributes?.example

return relevantTransactions

Expand All @@ -84,7 +84,7 @@ compileRequest = (parseResult, httpRequest) ->
{uri, annotations} = compileUri(parseResult, httpRequest)
if uri
request = {
method: content(httpRequest.attributes.method)
method: content(httpRequest.attributes?.method)
uri
headers: compileHeaders(child(httpRequest, {element: 'httpHeaders'}))
body: content(messageBody) or ''
Expand All @@ -100,7 +100,7 @@ compileResponse = (httpResponse) ->
messageBodySchema = child(httpResponse, {element: 'asset', 'meta.classes': 'messageBodySchema'})

response =
status: content(httpResponse.attributes.statusCode)
status: content(httpResponse.attributes?.statusCode)
headers: compileHeaders(child(httpResponse, {element: 'httpHeaders'}))
body: content(messageBody) or ''

Expand Down Expand Up @@ -213,8 +213,8 @@ compilePathOrigin = (parseResult, filename, httpTransaction) ->
apiName: content(api.meta?.title) or ''
resourceGroupName: content(resourceGroup?.meta?.title) or ''
resourceName: content(resource.meta?.title) or content(resource.attributes?.href) or ''
actionName: content(transition.meta?.title) or content(httpRequest.attributes.method) or ''
exampleName: "Example #{httpTransaction.attributes.example}"
actionName: content(transition.meta?.title) or content(httpRequest.attributes?.method) or ''
exampleName: "Example #{httpTransaction.attributes?.example}"
}


Expand Down
2 changes: 1 addition & 1 deletion src/parse.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parse = (source, callback) ->
err = new Error(err.message)

if apiElements
apiElements = apiElements.toRefract()
apiElements = fury.minim.toRefract(apiElements)
apiElements.content = apiElements.content.concat(annotations)
else
apiElements = null
Expand Down

0 comments on commit fdf2f56

Please sign in to comment.