diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-06-28 02:21:10 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-06-28 03:08:42 +0300 |
commit | add707252a0514ddb49b6f62f60b8d9ab0193156 (patch) | |
tree | f6a9d0481b848f7c29c1663420f2be2b868eb49e /spec | |
parent | 792d034059a19a2326f256f880e27a84fb906752 (diff) | |
parent | 2d9f133d308bd7624f10e65e3e6df5f640c4f38e (diff) |
Merge branch 'next-minor' into develop
... and also remove json-schema-rspec dependency from api specs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/integration/api/api_spec_helper.rb | 5 | ||||
-rw-r--r-- | spec/integration/api/aspects_controller_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/api/comments_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/api/contacts_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/api/conversations_controller_spec.rb | 8 | ||||
-rw-r--r-- | spec/integration/api/likes_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/api/messages_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/api/notifications_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/integration/api/photos_controller_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/api/posts_controller_spec.rb | 22 | ||||
-rw-r--r-- | spec/integration/api/reshares_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/api/search_controller_spec.rb | 12 | ||||
-rw-r--r-- | spec/integration/api/streams_controller_spec.rb | 14 | ||||
-rwxr-xr-x | spec/integration/api/tag_followings_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/api/users_controller_spec.rb | 14 | ||||
-rw-r--r-- | spec/integration/exporter_spec.rb | 3 | ||||
-rw-r--r-- | spec/spec_helper.rb | 4 |
17 files changed, 55 insertions, 53 deletions
diff --git a/spec/integration/api/api_spec_helper.rb b/spec/integration/api/api_spec_helper.rb index 02f6c4bf9..b0d742c24 100644 --- a/spec/integration/api/api_spec_helper.rb +++ b/spec/integration/api/api_spec_helper.rb @@ -6,3 +6,8 @@ def confirm_api_error(response, code, message) expect(response.status).to eq(code) expect(JSON.parse(response.body)).to eq("code" => code, "message" => message) end + +def expect_to_match_json_schema(json, fragment) + errors = JSON::Validator.fully_validate("lib/schemas/api_v1.json", json, fragment: fragment) + expect(errors).to be_empty +end diff --git a/spec/integration/api/aspects_controller_spec.rb b/spec/integration/api/aspects_controller_spec.rb index 9661b288c..5c4ec45bd 100644 --- a/spec/integration/api/aspects_controller_spec.rb +++ b/spec/integration/api/aspects_controller_spec.rb @@ -46,7 +46,7 @@ describe Api::V1::AspectsController do expect(aspect["order"]).to eq(found_aspect.order_id) end - expect(aspects.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/aspects") + expect_to_match_json_schema(aspects.to_json, "#/definitions/aspects") end context "without impromper credentials" do @@ -81,7 +81,7 @@ describe Api::V1::AspectsController do expect(aspect["name"]).to eq(@aspect2.name) expect(aspect["order"]).to eq(@aspect2.order_id) - expect(aspect.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/aspect") + expect_to_match_json_schema(aspect.to_json, "#/definitions/aspect") end end diff --git a/spec/integration/api/comments_controller_spec.rb b/spec/integration/api/comments_controller_spec.rb index 9f8e08c7e..3c90195c9 100644 --- a/spec/integration/api/comments_controller_spec.rb +++ b/spec/integration/api/comments_controller_spec.rb @@ -156,7 +156,7 @@ describe Api::V1::CommentsController do confirm_comment_format(comments[1], auth.user, @comment_text2) expect(comments).to all(include("reported" => false)) - expect(comments.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/comments") + expect_to_match_json_schema(comments.to_json, "#/definitions/comments") end it "returns reported status of a comment" do diff --git a/spec/integration/api/contacts_controller_spec.rb b/spec/integration/api/contacts_controller_spec.rb index ccc8488a0..26571a9a8 100644 --- a/spec/integration/api/contacts_controller_spec.rb +++ b/spec/integration/api/contacts_controller_spec.rb @@ -58,7 +58,7 @@ describe Api::V1::ContactsController do contacts = response_body_data(response) expect(contacts.length).to eq(@aspect1.contacts.length) - expect(contacts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/users") + expect_to_match_json_schema(contacts.to_json, "#/definitions/users") end end diff --git a/spec/integration/api/conversations_controller_spec.rb b/spec/integration/api/conversations_controller_spec.rb index 9c69462a5..2ebf368c6 100644 --- a/spec/integration/api/conversations_controller_spec.rb +++ b/spec/integration/api/conversations_controller_spec.rb @@ -164,7 +164,7 @@ describe Api::V1::ConversationsController do actual_conversation = returned_conversations.select {|c| c["guid"] == @read_conversation_guid }[0] confirm_conversation_format(actual_conversation, @read_conversation, [auth.user, alice]) - expect(returned_conversations.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/conversations") + expect_to_match_json_schema(returned_conversations.to_json, "#/definitions/conversations") end it "returns all the user unread conversations" do @@ -230,7 +230,7 @@ describe Api::V1::ConversationsController do conversation = response_body(response) confirm_conversation_format(conversation, @conversation, [auth.user, alice]) - expect(conversation.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/conversation") + expect_to_match_json_schema(conversation.to_json, "#/definitions/conversation") end end @@ -283,7 +283,7 @@ describe Api::V1::ConversationsController do conversation = response_body(response) confirm_conversation_format(conversation, @conversation, [auth.user, alice]) - expect(conversation.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/conversation") + expect_to_match_json_schema(conversation.to_json, "#/definitions/conversation") end it "marks as unread and returns the corresponding conversation" do @@ -297,7 +297,7 @@ describe Api::V1::ConversationsController do conversation = response_body(response) confirm_conversation_format(conversation, @conversation, [auth.user, alice], read: false) - expect(conversation.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/conversation") + expect_to_match_json_schema(conversation.to_json, "#/definitions/conversation") end end diff --git a/spec/integration/api/likes_controller_spec.rb b/spec/integration/api/likes_controller_spec.rb index b65b54583..463919268 100644 --- a/spec/integration/api/likes_controller_spec.rb +++ b/spec/integration/api/likes_controller_spec.rb @@ -75,7 +75,7 @@ describe Api::V1::LikesController do confirm_like_format(likes, bob) confirm_like_format(likes, auth.user) - expect(likes.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/likes") + expect_to_match_json_schema(likes.to_json, "#/definitions/likes") end end diff --git a/spec/integration/api/messages_controller_spec.rb b/spec/integration/api/messages_controller_spec.rb index b292bdf50..944e22de6 100644 --- a/spec/integration/api/messages_controller_spec.rb +++ b/spec/integration/api/messages_controller_spec.rb @@ -132,7 +132,7 @@ describe Api::V1::MessagesController do messages = response_body_data(response) expect(messages.length).to eq(1) - expect(messages.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/messages") + expect_to_match_json_schema(messages.to_json, "#/definitions/messages") confirm_message_format(messages[0], "first message", auth.user) conversation = get_conversation(@conversation_guid) diff --git a/spec/integration/api/notifications_controller_spec.rb b/spec/integration/api/notifications_controller_spec.rb index 485f05113..ae7d3a20e 100644 --- a/spec/integration/api/notifications_controller_spec.rb +++ b/spec/integration/api/notifications_controller_spec.rb @@ -41,7 +41,7 @@ describe Api::V1::NotificationsController do expect(notifications.length).to eq(2) confirm_notification_format(notifications[1], @notification, "also_commented", nil) - expect(notifications.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/notifications") + expect_to_match_json_schema(notifications.to_json, "#/definitions/notifications") end it "with proper credentials and unread only" do @@ -73,7 +73,7 @@ describe Api::V1::NotificationsController do expect(notifications.length).to eq(2) confirm_notification_format(notifications[1], @notification, "also_commented", nil) - expect(notifications.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/notifications") + expect_to_match_json_schema(notifications.to_json, "#/definitions/notifications") end it "with proper credentials and after certain date" do @@ -133,7 +133,7 @@ describe Api::V1::NotificationsController do notification = JSON.parse(response.body) confirm_notification_format(notification, @notification, "also_commented", @post) - expect(notification.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/notification") + expect_to_match_json_schema(notification.to_json, "#/definitions/notification") end end diff --git a/spec/integration/api/photos_controller_spec.rb b/spec/integration/api/photos_controller_spec.rb index 970e3777d..5fee7151e 100644 --- a/spec/integration/api/photos_controller_spec.rb +++ b/spec/integration/api/photos_controller_spec.rb @@ -78,7 +78,7 @@ describe Api::V1::PhotosController do expect(photo.has_key?("post")).to be_falsey confirm_photo_format(photo, @user_photo1) - expect(photo.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/photo") + expect_to_match_json_schema(photo.to_json, "#/definitions/photo") end it "with correct GUID user's photo used in post and access token" do @@ -149,7 +149,7 @@ describe Api::V1::PhotosController do photos = response_body_data(response) expect(photos.length).to eq(2) - expect(photos.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/photos") + expect_to_match_json_schema(photos.to_json, "#/definitions/photos") end end diff --git a/spec/integration/api/posts_controller_spec.rb b/spec/integration/api/posts_controller_spec.rb index c7356ac35..e0e1886b2 100644 --- a/spec/integration/api/posts_controller_spec.rb +++ b/spec/integration/api/posts_controller_spec.rb @@ -74,7 +74,7 @@ describe Api::V1::PostsController do post = response_body(response) confirm_post_format(post, alice, @status, [bob, eve]) - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end end @@ -101,7 +101,7 @@ describe Api::V1::PostsController do post = response_body(response) confirm_post_format(post, alice, status_message) - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end end @@ -126,7 +126,7 @@ describe Api::V1::PostsController do expect(post["own_interaction_state"]["subscribed"]).to be true expect(post["own_interaction_state"]["reported"]).to be true - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end end @@ -143,7 +143,7 @@ describe Api::V1::PostsController do post = response_body(response) confirm_reshare_format(post, @status, alice) - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end end @@ -238,7 +238,7 @@ describe Api::V1::PostsController do expect(response.status).to eq(200) post = response_body(response) confirm_post_format(post, auth.user, post_for_ref_only) - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end it "or creates a private post" do @@ -261,7 +261,7 @@ describe Api::V1::PostsController do post = response_body(response) expect(response.status).to eq(200) confirm_post_format(post, auth.user, post_for_ref_only) - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end it "doesn't creates a private post without private:modify scope in token" do @@ -305,7 +305,7 @@ describe Api::V1::PostsController do post_for_ref_only = StatusMessageCreationService.new(auth.user).create(merged_params) confirm_post_format(post, auth.user, post_for_ref_only) - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end it "fails to add other's photos" do @@ -375,7 +375,7 @@ describe Api::V1::PostsController do post = response_body(response) expect(response.status).to eq(200) confirm_post_format(post, auth.user, post_for_ref_only) - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end it "fails poll with no answers" do @@ -451,7 +451,7 @@ describe Api::V1::PostsController do post = response_body(response) expect(response.status).to eq(200) confirm_post_format(post, auth.user, post_for_ref_only) - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end it "creates with mentions" do @@ -490,7 +490,7 @@ describe Api::V1::PostsController do expect(response.status).to eq(200) post = response_body(response) expect(post["nsfw"]).to be_truthy - expect(post.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(post.to_json, "#/definitions/post") end end @@ -505,7 +505,7 @@ describe Api::V1::PostsController do } ) expect(response.status).to eq(200) - expect(response.body).to match_json_schema(:api_v1_schema, fragment: "#/definitions/post") + expect_to_match_json_schema(response.body, "#/definitions/post") end it "fails to add other's photos" do diff --git a/spec/integration/api/reshares_controller_spec.rb b/spec/integration/api/reshares_controller_spec.rb index b957fe9bc..40bc210d9 100644 --- a/spec/integration/api/reshares_controller_spec.rb +++ b/spec/integration/api/reshares_controller_spec.rb @@ -55,7 +55,7 @@ describe Api::V1::ResharesController do expect(reshare["guid"]).not_to be_nil confirm_person_format(reshare["author"], alice) - expect(reshares.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/reshares") + expect_to_match_json_schema(reshares.to_json, "#/definitions/reshares") end it "succeeds but empty with private post it can see" do diff --git a/spec/integration/api/search_controller_spec.rb b/spec/integration/api/search_controller_spec.rb index 0c98e698b..de63b33af 100644 --- a/spec/integration/api/search_controller_spec.rb +++ b/spec/integration/api/search_controller_spec.rb @@ -69,7 +69,7 @@ describe Api::V1::SearchController do users = response_body_data(response) expect(users.length).to eq(5) - expect(users.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/users") + expect_to_match_json_schema(users.to_json, "#/definitions/users") end it "succeeds by name" do @@ -81,7 +81,7 @@ describe Api::V1::SearchController do users = response_body_data(response) expect(users.length).to eq(1) - expect(users.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/users") + expect_to_match_json_schema(users.to_json, "#/definitions/users") end it "succeeds by handle" do @@ -93,7 +93,7 @@ describe Api::V1::SearchController do users = response_body_data(response) expect(users.length).to eq(1) - expect(users.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/users") + expect_to_match_json_schema(users.to_json, "#/definitions/users") end context "with a contacts filter" do @@ -424,7 +424,7 @@ describe Api::V1::SearchController do posts = response_body_data(response) expect(posts.length).to eq(2) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "only returns public posts without private scope" do @@ -478,7 +478,7 @@ describe Api::V1::SearchController do tags = response_body_data(response) expect(tags.size).to eq(3) - expect(tags.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/tags") + expect_to_match_json_schema(tags.to_json, "#/definitions/tags") end it "does a prefix search" do @@ -490,7 +490,7 @@ describe Api::V1::SearchController do tags = response_body_data(response) expect(tags.size).to eq(2) - expect(tags.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/tags") + expect_to_match_json_schema(tags.to_json, "#/definitions/tags") end it "fails with missing parameters" do diff --git a/spec/integration/api/streams_controller_spec.rb b/spec/integration/api/streams_controller_spec.rb index fa650664d..a5371fd55 100644 --- a/spec/integration/api/streams_controller_spec.rb +++ b/spec/integration/api/streams_controller_spec.rb @@ -84,7 +84,7 @@ describe Api::V1::StreamsController do posts = response_body_data(response) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "contains expected aspect message" do @@ -146,7 +146,7 @@ describe Api::V1::StreamsController do posts = response_body_data(response) expect(posts.length).to eq(3) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "public posts only tags expected" do @@ -185,7 +185,7 @@ describe Api::V1::StreamsController do expect(response.status).to eq(200) posts = response_body_data(response) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "contains activity message" do @@ -228,7 +228,7 @@ describe Api::V1::StreamsController do expect(response.status).to eq(200) posts = response_body_data(response) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "contains main message" do @@ -271,7 +271,7 @@ describe Api::V1::StreamsController do expect(response.status).to eq(200) posts = response_body_data(response) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "contains commented message" do @@ -312,7 +312,7 @@ describe Api::V1::StreamsController do expect(response.status).to eq(200) posts = response_body_data(response) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "contains mentions message" do @@ -353,7 +353,7 @@ describe Api::V1::StreamsController do expect(response.status).to eq(200) posts = response_body_data(response) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "contains liked message" do diff --git a/spec/integration/api/tag_followings_controller_spec.rb b/spec/integration/api/tag_followings_controller_spec.rb index c3bf30f66..9968af7fc 100755 --- a/spec/integration/api/tag_followings_controller_spec.rb +++ b/spec/integration/api/tag_followings_controller_spec.rb @@ -102,7 +102,7 @@ describe Api::V1::TagFollowingsController do expect(items.length).to eq(@expected_tags.length) @expected_tags.each {|tag| expect(items.find(tag)).to be_truthy } - expect(items.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/tags") + expect_to_match_json_schema(items.to_json, "#/definitions/tags") end end diff --git a/spec/integration/api/users_controller_spec.rb b/spec/integration/api/users_controller_spec.rb index a3833c06d..e44319376 100644 --- a/spec/integration/api/users_controller_spec.rb +++ b/spec/integration/api/users_controller_spec.rb @@ -65,7 +65,7 @@ describe Api::V1::UsersController do expect(user["guid"]).to eq(auth.user.guid) confirm_self_data_format(user) - expect(user.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/own_user") + expect_to_match_json_schema(user.to_json, "#/definitions/own_user") end it "fails if invalid token" do @@ -90,7 +90,7 @@ describe Api::V1::UsersController do expect(user["guid"]).to eq(alice.person.guid) confirm_public_profile_hash(user) - expect(user.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/user") + expect_to_match_json_schema(user.to_json, "#/definitions/user") end it "succeeds with in Aspect valid user" do @@ -107,7 +107,7 @@ describe Api::V1::UsersController do expect(user["guid"]).to eq(alice.person.guid) confirm_public_profile_hash(user) - expect(user.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/user") + expect_to_match_json_schema(user.to_json, "#/definitions/user") end it "succeeds with limited data on non-public/not shared" do @@ -134,7 +134,7 @@ describe Api::V1::UsersController do expect(user["guid"]).to eq(eve.person.guid) confirm_public_profile_hash(user) - expect(user.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/user") + expect_to_match_json_schema(user.to_json, "#/definitions/user") end it "fails if invalid token" do @@ -327,7 +327,7 @@ describe Api::V1::UsersController do expect(contacts.length).to eq(1) confirm_person_format(contacts[0], alice) - expect(contacts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/users") + expect_to_match_json_schema(contacts.to_json, "#/definitions/users") end it "fails with invalid GUID" do @@ -393,7 +393,7 @@ describe Api::V1::UsersController do expect(guids).not_to include(@private_photo1.guid) confirm_photos(photos) - expect(photos.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/photos") + expect_to_match_json_schema(photos.to_json, "#/definitions/photos") end it "returns only public photos of other user without private:read scope in token" do @@ -469,7 +469,7 @@ describe Api::V1::UsersController do post = posts.select {|p| p["guid"] == @public_post1.guid } confirm_post_format(post[0], alice, @public_post1) - expect(posts.to_json).to match_json_schema(:api_v1_schema, fragment: "#/definitions/posts") + expect_to_match_json_schema(posts.to_json, "#/definitions/posts") end it "returns logged in user's posts" do diff --git a/spec/integration/exporter_spec.rb b/spec/integration/exporter_spec.rb index ef3750179..e1134d3c0 100644 --- a/spec/integration/exporter_spec.rb +++ b/spec/integration/exporter_spec.rb @@ -16,7 +16,8 @@ describe Diaspora::Exporter do %i[generic_user_data activity status_messages_flavours work_aspect] ) - expect(JSON.parse(json)).to match_json_schema(:archive_schema) + errors = JSON::Validator.fully_validate(ArchiveValidator::SchemaValidator::JSON_SCHEMA, JSON.parse(json)) + expect(errors).to be_empty end it "contains basic user data" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8a6b9d585..e50ea8b09 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -140,10 +140,6 @@ RSpec.configure do |config| config.include FactoryBot::Syntax::Methods - config.include JSON::SchemaMatchers - config.json_schemas[:archive_schema] = ArchiveValidator::SchemaValidator::JSON_SCHEMA - config.json_schemas[:api_v1_schema] = "lib/schemas/api_v1.json" - JSON::Validator.add_schema( JSON::Schema.new( DiasporaFederation::Schemas.federation_entities, |