Skip to content

Commit f63a5bf

Browse files
committed
more updates
1 parent 8ab33a4 commit f63a5bf

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Don't commit (generated) JSON files
22
*.json
3+
4+
# Emacs
5+
*~

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ all: openapi.json openapi.min.json
33
clean:
44
rm -f *.json
55

6-
# This is the "extract" set of endpoints
6+
# This is the "extract" set of endpoints.
7+
#
8+
# For the curious, this URL was pulled from
9+
# https://docs.diffbot.com/openapi. It's not hard to see how
10+
# additional parts of the OpenAPI spec could be similarly extracted.
711
openapi-extract.json:
812
curl -o openapi-extract.json https://docs.diffbot.com/openapi/638975592e00230010aaaa39
913

@@ -22,4 +26,3 @@ openapi.json: openapi-extract.json
2226
# Create a minified version, while we're in here
2327
openapi.min.json: openapi.json
2428
cat openapi.json | jq -c >openapi.min.json
25-

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# diffbot-openapi-spec
2+
3+
A community-managed OpenAPI spec for the (excellent)
4+
[Diffbot](https://www.diffbot.com/) [API](https://docs.diffbot.com/).
5+
6+
Unfortunately, Diffbot does not appear to publish a public OpenAPI
7+
spec. However, with a little coaxing, it's possible to extract a
8+
(generally) OpenAPI spec-shaped object from [its documentation
9+
platform](https://docs.diffbot.com/). (The curious can check the
10+
Makefile to see how this is done.) This project simply pulls down that
11+
OpenAPI-shaped object, massages it into compliance with [v3.0.x of the
12+
OpenAPI spec](https://spec.openapis.org/oas/v3.0.3.html), and makes
13+
releases available for general download.
14+
15+
At this time, the author only requires the extract
16+
endpoints. Therefore, only the extract endpoints are currently
17+
supported. However, the process to add more endpoints is described in
18+
the Makefile, and all PRs are welcome.
19+
20+
Naturally, if at any point Diffbot should release an OpenAPI spec
21+
publicly, users should immediately prefer that spec. In the meantime,
22+
hopefully this will do nicely. If I become aware of any official
23+
OpenAPI spec, I'll be sure to link it here. This repo will stay up
24+
regardless, for reliability.

0 commit comments

Comments
 (0)