diff --git a/schemas/2.2/example.json b/schemas/2.2/example.json index b0bfa07..b83a70e 100644 --- a/schemas/2.2/example.json +++ b/schemas/2.2/example.json @@ -1,5 +1,5 @@ { - "version": "2.1", + "version": "2.2", "software": { "name": "diaspora", "version": "0.5.0", diff --git a/schemas/2.2/schema.json b/schemas/2.2/schema.json index 561e644..8908712 100644 --- a/schemas/2.2/schema.json +++ b/schemas/2.2/schema.json @@ -1,7 +1,8 @@ { + "title": "NodeInfo schema version 2.2", "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://nodeinfo.diaspora.software/ns/schema/2.1#", - "description": "NodeInfo schema version 2.1.", + "id": "http://nodeinfo.diaspora.software/ns/schema/2.2#", + "description": "NodeInfo is an effort to create a standardized way of exposing metadata about a server running one of the distributed social networks.", "type": "object", "additionalProperties": false, "required": [ @@ -15,9 +16,9 @@ ], "properties": { "version": { - "description": "The schema version, must be 2.1.", + "description": "The schema version, must be 2.2.", "enum": [ - "2.1" + "2.2" ] }, "software": { diff --git a/tests/spec/nodeinfo_22_spec.rb b/tests/spec/nodeinfo_22_spec.rb new file mode 100644 index 0000000..e00b7a6 --- /dev/null +++ b/tests/spec/nodeinfo_22_spec.rb @@ -0,0 +1,11 @@ +require "spec_helper" + +RSpec.describe "NodeInfo schema 2.2" do + it "is a valid draft7 json schema" do + expect(schema_for("2.2")).to match_json_schema :json_schema_draft4 + end + + it "validates the example" do + expect(example_for("2.2")).to match_json_schema :nodeinfo_22 + end +end