Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,958 changes: 1,957 additions & 1 deletion definitions/posts/posts.json

Large diffs are not rendered by default.

45,634 changes: 22,817 additions & 22,817 deletions postman/discourse.postman_collection.json

Large diffs are not rendered by default.

1,083 changes: 1,082 additions & 1 deletion responses/admin/get_badges.json

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions responses/groups/group_members_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
"last_seen_at": "2016-10-29T12:53:52.312Z"
}
],
"owners": [

],
"owners": [],
"meta": {
"total": 1,
"limit": 50,
Expand Down
4 changes: 1 addition & 3 deletions responses/topics/private-messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"draft_key": "new_topic",
"draft_sequence": 2,
"per_page": 30,
"topics": [

]
"topics": []
}
}
23,905 changes: 23,904 additions & 1 deletion swagger.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ paths:
in: path
required: true
type: string
description: ProTip: You can just use a `-` instead of the actual slug and the topic will be found by the id.
example: -
description: "ProTip: You can just use a `-` instead of the actual slug and the topic will be found by the id."
example: "-"
- name: id
in: path
required: true
Expand Down Expand Up @@ -5658,7 +5658,7 @@ paths:
reply_by_email_enabled:
type: boolean
example: false
description: `reply_by_email_address` needs to be set first
description: "`reply_by_email_address` needs to be set first"
responses:
'200':
description: |
Expand Down Expand Up @@ -6545,7 +6545,7 @@ paths:
always_show_trimmed_content:
type: boolean
example: false
description: Always show trimmed part of incoming emails. WARNING: might reveal email addresses.
description: "Always show trimmed part of incoming emails. WARNING: might reveal email addresses."
responses:
'200':
description: |
Expand Down
3 changes: 2 additions & 1 deletion to_json.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'json'
require 'json_schema_ref_parser'

def read_yml_file(file)
Expand All @@ -14,4 +15,4 @@ def write_json_file(json)

schema = read_yml_file('swagger.yml')
result = JsonSchemaRefParser::RefParser.dereference(schema)
write_json_file(result.to_json)
write_json_file(JSON.pretty_generate(result))
3 changes: 1 addition & 2 deletions tojson.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ fs.readFile('swagger.yml', 'utf8', function(err, data) {
if (err) {
console.error(err);
} else {
fs.writeFile('swagger.json', JSON.stringify(schema), function(err) {
fs.writeFile('swagger.json', JSON.stringify(schema, null, 2).concat('\n'), function(err) {
if (err) return console.log(err);
console.log('yml converted to json');
});
}
});
});