Skip to content

Commit d5d6380

Browse files
author
Phil Sturgeon
authoredMay 31, 2018
Merge pull request #82 from wework/release/0.7.2
Release v0.7.2
2 parents 521f0b1 + 64bee3f commit d5d6380

File tree

4 files changed

+7
-5148
lines changed

4 files changed

+7
-5148
lines changed
 

‎CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## Unreleased
7+
## [0.7.2] - 2018-05-31
88
### Fixed
9+
- Fix `message is undefined` error ([#78])
910
- Resolver was treating `$ref` with a URL like a file. ([#80])
1011

12+
[#78]: https://github.com/wework/speccy/pull/78
1113
[#80]: https://github.com/wework/speccy/pull/80
1214

1315
## [0.7.1] - 2018-05-17

‎README.md

+2-20
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ Not just a command line tool, speccy can be used to normalize machine-readable s
106106
The loader object will return a promise that resolves to an object containing
107107
the specification. For example:
108108

109-
```javascript
109+
``` javascript
110110
const loader = require('speccy/lib/loader');
111111

112112
const options = {
113-
resolve: true, // Resolve external references
113+
resolve: true, // Resolve external references
114114
jsonSchema: true // Treat $ref like JSON Schema and convert to OpenAPI Schema Objects
115115
};
116116

@@ -120,24 +120,6 @@ loader
120120
```
121121
122122
If `options.resolve` is truthy, speccy will resolve _external_ references.
123-
However, the loaded specification it may contain JSON pointers in lieu of
124-
_internal_ javascript references. A library like reftools can convert those
125-
pointers back to references:
126-
127-
```javascript
128-
const loader = require('speccy/lib/loader');
129-
const { dereference } = require('reftools/lib/dereference');
130-
131-
const options = {
132-
resolve: true, // Resolve external references
133-
jsonSchema: true // Treat $ref like JSON Schema and convert to OpenAPI Schema Objects
134-
};
135-
136-
module.exports = () => loader
137-
.loadSpec('path/to/my/spec', options) // Load the spec...
138-
.then(spec => Promise.resolve(dereference(spec))) // Resolve internal references.
139-
.then(spec => console.log(JSON.stringify(spec)); // ...and print it out.
140-
```
141123
142124
## Tests
143125

‎package-lock.json

+1-5,125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "speccy",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"description": "Your friendly OpenAPI v3.0 #WellActually CLI assistant.",
55
"bin": {
66
"speccy": "./speccy.js"
@@ -51,7 +51,6 @@
5151
"json-schema-to-openapi-schema": "^0.2.0",
5252
"node-fetch": "^1.7.3",
5353
"node-readfiles": "^0.2.0",
54-
"npm": "^6.1.0",
5554
"redoc": "next",
5655
"reftools": "0.0.20",
5756
"should": "^13.2.0"

0 commit comments

Comments
 (0)
Please sign in to comment.