From b8dafe86f4d9bf9f81cb623f697381f62ff8a267 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 3 Feb 2021 18:50:11 +0000 Subject: [PATCH 01/19] Move and more aptly name check_examples.py scripts --- .circleci/config.yml | 8 +++----- .../check-event-schema-examples.py | 0 api/check_examples.py => scripts/check-swagger-sources.py | 0 scripts/test-and-build.sh | 6 +++--- 4 files changed, 6 insertions(+), 8 deletions(-) rename event-schemas/check_examples.py => scripts/check-event-schema-examples.py (100%) rename api/check_examples.py => scripts/check-swagger-sources.py (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf4404ce..274dc007 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,9 +5,10 @@ gendoc: &gendoc scripts/gendoc.py genswagger: &genswagger - name: Generate the swagger + name: Validate sources and generate swagger json command: | source /env/bin/activate + scripts/check-swagger-sources.py scripts/dump-swagger.py buildswaggerui: &buildswaggerui @@ -27,10 +28,7 @@ checkexamples: &checkexamples name: Check Event Examples command: | source /env/bin/activate - cd event-schemas - ./check_examples.py - cd ../api - ./check_examples.py + scripts/check-event-schema-examples.py genmatrixassets: &genmatrixassets name: Generate/Verify matrix.org assets diff --git a/event-schemas/check_examples.py b/scripts/check-event-schema-examples.py similarity index 100% rename from event-schemas/check_examples.py rename to scripts/check-event-schema-examples.py diff --git a/api/check_examples.py b/scripts/check-swagger-sources.py similarity index 100% rename from api/check_examples.py rename to scripts/check-swagger-sources.py diff --git a/scripts/test-and-build.sh b/scripts/test-and-build.sh index f45e2da6..f4c3a90f 100755 --- a/scripts/test-and-build.sh +++ b/scripts/test-and-build.sh @@ -14,9 +14,9 @@ pip --version pip install -r scripts/requirements.txt # do sanity checks on the examples and swagger -(cd event-schemas/ && ./check_examples.py) -(cd api && ./check_examples.py) -(cd api && npm install && node validator.js -s "client-server") +scripts/check-event-schema-examples.py +scripts/check-swagger-sources.py +(cd event-schemas/api && npm install && node validator.js -s "client-server") : ${GOPATH:=${WORKSPACE}/.gopath} mkdir -p "${GOPATH}" From 64231f079da4f04247e699dc18d47c644f2f7cbd Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Thu, 4 Feb 2021 20:19:58 +0000 Subject: [PATCH 02/19] Update checker scripts to work correctly from the scripts/ dir check-swagger-sources also had a bug which caused it to fail while validating the directory structure of /data/api. This was fixed by @KitsuneRal - thank you! --- scripts/check-event-schema-examples.py | 9 +++- scripts/check-swagger-sources.py | 62 +++++++++++++++++++------- 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/scripts/check-event-schema-examples.py b/scripts/check-event-schema-examples.py index 31daa478..50f9de7b 100755 --- a/scripts/check-event-schema-examples.py +++ b/scripts/check-event-schema-examples.py @@ -128,7 +128,14 @@ def check_example_dir(exampledir, schemadir): if __name__ == '__main__': + # Get the directory that this script is residing in + script_directory = os.path.dirname(os.path.realpath(__file__)) + + # Resolve the directories to check, relative to the script path + examples_directory = os.path.join(script_directory, "../event-schemas/examples") + schema_directory = os.path.join(script_directory, "../event-schemas/schema") + try: - check_example_dir("examples", "schema") + check_example_dir(examples_directory, schema_directory) except: sys.exit(1) diff --git a/scripts/check-swagger-sources.py b/scripts/check-swagger-sources.py index 94f3495e..df99b7c0 100755 --- a/scripts/check-swagger-sources.py +++ b/scripts/check-swagger-sources.py @@ -108,13 +108,36 @@ def check_swagger_file(filepath): def resolve_references(path, schema): + """Recurse through a given schema until we find a $ref key. Upon doing so, + check that the referenced file exists, then load it up and check all of the + references in that file. Continue on until we've hit all dead ends. + + $ref values are deleted from schemas as they are validated, to prevent + duplicate work. + """ if isinstance(schema, dict): # do $ref first if '$ref' in schema: - value = schema['$ref'] - path = os.path.abspath(os.path.join(os.path.dirname(path), value)) - ref = load_file("file://" + path) - result = resolve_references(path, ref) + # Pull the referenced filepath from the schema + referenced_file = schema['$ref'] + + # Referenced filepaths are relative, so take the current path's + # directory and append the relative, referenced path to it. + inner_path = os.path.join(os.path.dirname(path), referenced_file) + + # Then convert the path (which may contiain '../') into a + # normalised, absolute path + inner_path = os.path.abspath(inner_path) + + # Load the referenced file + ref = load_file("file://" + inner_path) + + # Check that the references in *this* file are valid + result = resolve_references(inner_path, ref) + + # They were valid, and so were the sub-references. Delete + # the reference here to ensure we don't pass over it again + # when checking other files del schema['$ref'] else: result = {} @@ -143,15 +166,22 @@ def load_file(path): if __name__ == '__main__': - paths = sys.argv[1:] - if not paths: - paths = [] - for (root, dirs, files) in os.walk(os.curdir): - for filename in files: - if filename.endswith(".yaml"): - paths.append(os.path.join(root, filename)) - for path in paths: - try: - check_swagger_file(path) - except Exception as e: - raise ValueError("Error checking file %r" % (path,), e) + # Get the directory that this script is residing in + script_directory = os.path.dirname(os.path.realpath(__file__)) + + # Resolve the directory containing the swagger sources, + # relative to the script path + source_files_directory = os.path.realpath(os.path.join(script_directory, "../data")) + + # Walk the source path directory, looking for YAML files to check + for (root, dirs, files) in os.walk(source_files_directory): + for filename in files: + if not filename.endswith(".yaml"): + continue + + path = os.path.join(root, filename) + + try: + check_swagger_file(path) + except Exception as e: + raise ValueError("Error checking file %s" % (path,), e) From 3c66e149f3628b211a4d07cc58874aabfb99a324 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 5 Feb 2021 12:40:45 +0000 Subject: [PATCH 03/19] Move validator.js to scripts/ directory, update calls --- .circleci/config.yml | 4 +- scripts/package.json | 15 +++++++ scripts/test-and-build.sh | 6 ++- scripts/validator.js | 86 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 scripts/package.json create mode 100644 scripts/validator.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 274dc007..e3ac14d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,9 +39,9 @@ genmatrixassets: &genmatrixassets validateapi: &validateapi name: Validate OpenAPI specifications command: | - cd api + cd scripts npm install - node validator.js -s "client-server" + node validator.js -s "../data/api/client-server" buildspeculator: &buildspeculator name: Build Speculator diff --git a/scripts/package.json b/scripts/package.json new file mode 100644 index 00000000..84b9dd7b --- /dev/null +++ b/scripts/package.json @@ -0,0 +1,15 @@ +{ + "name": "swagger-cli-validator", + "version": "0.0.1", + "description": "", + "main": "validator.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "nopt": "^3.0.2", + "swagger-parser": "^3.2.1" + } +} diff --git a/scripts/test-and-build.sh b/scripts/test-and-build.sh index f4c3a90f..76f49e2e 100755 --- a/scripts/test-and-build.sh +++ b/scripts/test-and-build.sh @@ -11,12 +11,16 @@ virtualenv -p python3 env python --version pip --version +# Install python dependencies pip install -r scripts/requirements.txt +# Install node dependencies +npm install --prefix=scripts + # do sanity checks on the examples and swagger scripts/check-event-schema-examples.py scripts/check-swagger-sources.py -(cd event-schemas/api && npm install && node validator.js -s "client-server") +node scripts/validator.js --schema "data/api/client-server" : ${GOPATH:=${WORKSPACE}/.gopath} mkdir -p "${GOPATH}" diff --git a/scripts/validator.js b/scripts/validator.js new file mode 100644 index 00000000..c20dd993 --- /dev/null +++ b/scripts/validator.js @@ -0,0 +1,86 @@ +"use strict"; +var fs = require("fs"); +var nopt = require("nopt"); +var parser = require("swagger-parser"); +var path = require("path"); + +var opts = nopt({ + "help": Boolean, + "schema": path +}, { + "h": "--help", + "s": "--schema" +}); + +if (opts.help) { + console.log( + "Use swagger-parser to validate against Swagger 2.0\n"+ + "Usage:\n"+ + " node validator.js -s " + ); + process.exit(0); +} +if (!opts.schema) { + console.error("No [s]chema specified."); + process.exit(1); +} + + +var errFn = function(err, api) { + if (!err) { + return; + } + console.error(err); + process.exit(1); +}; + +/** + * @brief Produce a handler for parser.validate(). + * Recommended usage: `parser.validate(filename, makeHandler(filename));` + * or `parser.validate(schema, makeHandler());`. + * @param scope - usually a filename, this will be used to denote + * an (in)valid schema in console output; "Schema" if undefined + * @returns {function} the handler that can be passed to parser.validate + */ +function makeHandler(scope) { + if (!scope) + scope = "Schema"; + return function(err, api, metadata) { + if (err) { + console.error("%s is not valid.", scope || "Schema"); + errFn(err, api, metadata); // Won't return + } + + Object.keys(api.paths).forEach(function (endpoint) { + var operationsMap = api.paths[endpoint]; + Object.keys(operationsMap).forEach(function (verb) { + if (!operationsMap[verb]["operationId"]) { + console.error("%s is not valid", scope); + errFn("operationId is missing in " + endpoint + ", verb " + verb, api); + } + }) + }); + + console.log("%s is valid.", scope); + } +} + +var isDir = fs.lstatSync(opts.schema).isDirectory(); +if (isDir) { + console.log("Checking directory %s for .yaml files...", opts.schema); + fs.readdir(opts.schema, function(err, files) { + if (err) { + errFn(err); // Won't return + } + files.forEach(function(f) { + var suffix = ".yaml"; + if (f.indexOf(suffix, f.length - suffix.length) > 0) { + parser.validate(path.join(opts.schema, f), makeHandler(f)); + } + }); + }); +} +else{ + parser.validate(opts.schema, makeHandler(opts.schema)); +} + From 00c6a866e29c8694b9b8f1beaf9bc0bf8c513249 Mon Sep 17 00:00:00 2001 From: Will Date: Mon, 25 Jan 2021 21:16:42 -0800 Subject: [PATCH 04/19] Move raw API and event schemas into /data directory Historical note: this was originally a series of several commits, spread out over several weeks. They have been squashed together to make `git annotate` work properly. The original commits were: * 91ab3934 2021-01-25 21:16:42 -0800 Add raw API end event schemas into /data directory * aae22f47 2021-01-25 21:33:06 -0800 Remove non-data files * 1092d4ca 2021-01-26 20:41:33 -0800 Add data-compatiuble extension (.yaml) to all data files that currently omit one * 21060109 2021-01-26 20:57:28 -0800 Remove symlink to event-schemas, and update openAPI schema paths accordingly * 4f633845 2021-04-12 21:54:54 -0600 Fix event schema examples too * 301c7b2f 2021-02-05 10:15:42 -0800 Restore docs describing OpenAPI extensions that we use --- api/README | 2 - api/client-server/definitions/event-schemas | 1 - api/files/backbone-min.js | 38 - api/files/css | 16 - api/files/handlebars-1.0.0.js | 2278 -------------- api/files/highlight.7.3.pack.js | 1 - api/files/jquery-1.8.0.min.js | 2 - api/files/jquery.ba-bbq.min.js | 18 - api/files/jquery.slideto.min.js | 1 - api/files/jquery.wiggle.min.js | 8 - api/files/reset.css | 125 - api/files/screen.css | 1221 -------- api/files/shred.bundle.js | 2765 ----------------- api/files/swagger-oauth.js | 211 -- api/files/swagger-ui.js | 2315 -------------- api/files/swagger.js | 1604 ---------- api/files/underscore-min.js | 32 - api/package.json | 15 - api/validator.js | 86 - .../definitions/location.yaml | 0 .../definitions/location_batch.yaml | 0 .../definitions/protocol.yaml | 0 .../definitions/protocol_metadata.yaml | 0 .../definitions/security.yaml | 0 .../application-service/definitions/user.yaml | 0 .../definitions/user_batch.yaml | 0 .../api}/application-service/protocols.yaml | 0 .../api}/application-service/query_room.yaml | 0 .../api}/application-service/query_user.yaml | 0 .../application-service/transactions.yaml | 4 +- .../api}/client-server/account-data.yaml | 0 {api => data/api}/client-server/admin.yaml | 0 .../client-server/administrative_contact.yaml | 0 .../appservice_room_directory.yaml | 0 {api => data/api}/client-server/banning.yaml | 0 .../api}/client-server/capabilities.yaml | 0 .../api}/client-server/content-repo.yaml | 0 .../api}/client-server/create_room.yaml | 0 .../api}/client-server/cross_signing.yaml | 0 .../client-server/definitions/auth_data.yaml | 0 .../definitions/auth_response.yaml | 0 .../definitions/client_device.yaml | 0 .../definitions/cross_signing_key.yaml | 0 .../definitions/device_keys.yaml | 0 .../definitions/errors/error.yaml | 0 .../definitions/errors/rate_limited.yaml | 0 .../api}/client-server/definitions/event.yaml | 0 .../definitions/event_batch.yaml | 2 +- .../definitions/event_filter.yaml | 0 .../definitions/key_backup_data.yaml | 0 .../definitions/openid_token.yaml | 0 .../definitions/public_rooms_response.yaml | 0 .../definitions/push_condition.yaml | 0 .../client-server/definitions/push_rule.yaml | 0 .../definitions/push_ruleset.yaml | 0 .../definitions/request_email_validation.yaml | 0 .../request_msisdn_validation.yaml | 0 .../definitions/request_token_response.yaml | 0 .../definitions/room_event_batch.yaml | 2 +- .../definitions/room_event_filter.yaml | 0 .../definitions/room_key_backup.yaml | 0 .../client-server/definitions/security.yaml | 0 .../definitions/state_event_batch.yaml | 2 +- .../definitions/sync_filter.yaml | 0 .../definitions/third_party_signed.yaml | 0 .../definitions/timeline_batch.yaml | 0 .../definitions/user_identifier.yaml | 0 .../definitions/wellknown/full.yaml | 0 .../definitions/wellknown/homeserver.yaml | 0 .../wellknown/identity_server.yaml | 0 .../api}/client-server/device_management.yaml | 0 .../api}/client-server/directory.yaml | 0 .../api}/client-server/event_context.yaml | 22 +- {api => data/api}/client-server/filter.yaml | 0 {api => data/api}/client-server/inviting.yaml | 0 {api => data/api}/client-server/joining.yaml | 0 .../api}/client-server/key_backup.yaml | 0 {api => data/api}/client-server/keys.yaml | 0 {api => data/api}/client-server/kicking.yaml | 0 {api => data/api}/client-server/leaving.yaml | 0 .../api}/client-server/list_joined_rooms.yaml | 0 .../api}/client-server/list_public_rooms.yaml | 0 {api => data/api}/client-server/login.yaml | 0 {api => data/api}/client-server/logout.yaml | 0 .../client-server/message_pagination.yaml | 10 +- .../api}/client-server/notifications.yaml | 2 +- {api => data/api}/client-server/old_sync.yaml | 34 +- {api => data/api}/client-server/openid.yaml | 0 .../api}/client-server/peeking_events.yaml | 4 +- {api => data/api}/client-server/presence.yaml | 0 {api => data/api}/client-server/profile.yaml | 0 {api => data/api}/client-server/pusher.yaml | 0 .../api}/client-server/pushrules.yaml | 0 .../api}/client-server/read_markers.yaml | 0 {api => data/api}/client-server/receipts.yaml | 0 .../api}/client-server/redaction.yaml | 0 .../api}/client-server/registration.yaml | 0 .../api}/client-server/report_content.yaml | 0 .../api}/client-server/room_initial_sync.yaml | 18 +- .../api}/client-server/room_send.yaml | 0 .../api}/client-server/room_state.yaml | 0 .../api}/client-server/room_upgrades.yaml | 0 {api => data/api}/client-server/rooms.yaml | 18 +- {api => data/api}/client-server/search.yaml | 10 +- .../client-server/sso_login_redirect.yaml | 0 {api => data/api}/client-server/sync.yaml | 14 +- {api => data/api}/client-server/tags.yaml | 0 .../client-server/third_party_lookup.yaml | 0 .../client-server/third_party_membership.yaml | 0 .../api}/client-server/to_device.yaml | 0 {api => data/api}/client-server/typing.yaml | 0 {api => data/api}/client-server/users.yaml | 0 {api => data/api}/client-server/versions.yaml | 0 {api => data/api}/client-server/voip.yaml | 0 .../api}/client-server/wellknown.yaml | 0 {api => data/api}/client-server/whoami.yaml | 0 {api => data/api}/identity/associations.yaml | 0 .../definitions/request_email_validation.yaml | 0 .../request_msisdn_validation.yaml | 0 .../api}/identity/definitions/security.yaml | 0 .../api}/identity/definitions/sid.yaml | 0 .../api}/identity/email_associations.yaml | 0 .../api}/identity/invitation_signing.yaml | 0 {api => data/api}/identity/lookup.yaml | 0 .../api}/identity/phone_associations.yaml | 0 {api => data/api}/identity/ping.yaml | 0 {api => data/api}/identity/pubkey.yaml | 0 {api => data/api}/identity/store_invite.yaml | 0 .../api}/identity/v2_associations.yaml | 0 {api => data/api}/identity/v2_auth.yaml | 0 .../api}/identity/v2_email_associations.yaml | 0 .../api}/identity/v2_invitation_signing.yaml | 0 {api => data/api}/identity/v2_lookup.yaml | 0 .../api}/identity/v2_phone_associations.yaml | 0 {api => data/api}/identity/v2_ping.yaml | 0 {api => data/api}/identity/v2_pubkey.yaml | 0 .../api}/identity/v2_store_invite.yaml | 0 {api => data/api}/identity/v2_terms.yaml | 0 .../api}/push-gateway/push_notifier.yaml | 0 {api => data/api}/server-server/backfill.yaml | 0 .../api}/server-server/definitions/edu.yaml | 0 .../event-schemas/m.device_list_update.yaml | 0 .../event-schemas/m.direct_to_device.yaml | 0 .../definitions/event-schemas/m.presence.yaml | 0 .../definitions/event-schemas/m.receipt.yaml | 0 .../event-schemas/m.signing_key_update.yaml | 0 .../definitions/event-schemas/m.typing.yaml | 0 .../definitions/invite_event.yaml | 0 .../api}/server-server/definitions/keys.yaml | 0 .../definitions/keys_query_response.yaml | 0 .../api}/server-server/definitions/pdu.yaml | 0 .../server-server/definitions/pdu_v3.yaml | 0 .../server-server/definitions/pdu_v4.yaml | 0 .../server-server/definitions/security.yaml | 0 .../definitions/send_join_response.yaml | 0 .../definitions/single_pdu_transaction.yaml | 0 .../definitions/transaction.yaml | 0 .../unlimited_pdu_transaction.yaml | 0 .../definitions/unsigned_pdu.yaml | 0 .../definitions/unsigned_pdu_base.yaml | 0 .../api}/server-server/event_auth.yaml | 0 {api => data/api}/server-server/events.yaml | 0 .../api}/server-server/examples/edu.json | 0 .../server-server/examples/minimal_pdu.json | 0 .../api}/server-server/examples/pdu.json | 0 .../api}/server-server/examples/pdu_v3.json | 0 .../api}/server-server/examples/pdu_v4.json | 0 .../server-server/examples/server_key.json | 0 .../examples/server_key_notary_signed.json | 0 .../server-server/examples/transaction.json | 0 .../server-server/examples/unsigned_pdu.json | 0 .../examples/unsigned_pdu_base.json | 0 .../api}/server-server/invites-v1.yaml | 2 +- .../api}/server-server/invites-v2.yaml | 2 +- {api => data/api}/server-server/joins-v1.yaml | 0 {api => data/api}/server-server/joins-v2.yaml | 0 .../api}/server-server/keys_query.yaml | 0 .../api}/server-server/keys_server.yaml | 0 .../api}/server-server/leaving-v1.yaml | 0 .../api}/server-server/leaving-v2.yaml | 0 {api => data/api}/server-server/openid.yaml | 0 .../api}/server-server/public_rooms.yaml | 0 {api => data/api}/server-server/query.yaml | 0 .../server-server/third_party_invite.yaml | 0 .../api}/server-server/transactions.yaml | 0 .../api}/server-server/user_devices.yaml | 0 .../api}/server-server/user_keys.yaml | 0 {api => data/api}/server-server/version.yaml | 0 .../api}/server-server/wellknown.yaml | 0 .../event-schemas}/examples/core/event.json | 0 .../examples/core/room_edu.json | 0 .../examples/core/room_event.json | 0 .../examples/core/state_event.json | 0 .../examples/invite_room_state.json | 0 .../examples/m.accepted_terms.yaml | 0 .../event-schemas/examples/m.call.answer.yaml | 0 .../examples/m.call.candidates.yaml | 0 .../event-schemas/examples/m.call.hangup.yaml | 0 .../event-schemas/examples/m.call.invite.yaml | 0 .../event-schemas/examples/m.direct.yaml | 0 .../event-schemas/examples/m.dummy.yaml | 0 .../examples/m.forwarded_room_key.yaml | 0 .../event-schemas/examples/m.fully_read.yaml | 0 .../examples/m.identity_server.yaml | 0 .../examples/m.ignored_user_list.yaml | 0 .../examples/m.key.verification.accept.yaml | 0 .../examples/m.key.verification.cancel.yaml | 0 .../examples/m.key.verification.key.yaml | 0 .../examples/m.key.verification.mac.yaml | 0 .../examples/m.key.verification.request.yaml | 0 .../m.key.verification.start$m.sas.v1.yaml | 0 .../examples/m.key.verification.start.yaml | 0 .../examples/m.policy.rule.room.yaml | 0 .../examples/m.policy.rule.server.yaml | 0 .../examples/m.policy.rule.user.yaml | 0 .../event-schemas/examples/m.presence.yaml | 0 .../event-schemas/examples/m.push_rules.yaml | 0 .../event-schemas/examples/m.receipt.yaml | 0 .../event-schemas/examples/m.room.avatar.yaml | 0 .../examples/m.room.canonical_alias.yaml | 0 .../event-schemas/examples/m.room.create.yaml | 0 .../examples/m.room.encrypted$megolm.yaml | 0 .../examples/m.room.encrypted$olm.yaml | 0 .../examples/m.room.encryption.yaml | 0 .../examples/m.room.guest_access.yaml | 0 .../examples/m.room.history_visibility.yaml | 0 .../examples/m.room.join_rules.yaml | 0 .../m.room.member$invite_room_state.yaml | 2 +- .../m.room.member$third_party_invite.yaml | 2 +- .../event-schemas/examples/m.room.member.yaml | 0 .../examples/m.room.message$m.audio.yaml | 0 .../examples/m.room.message$m.emote.yaml | 0 .../examples/m.room.message$m.file.yaml | 0 .../examples/m.room.message$m.image.yaml | 0 .../examples/m.room.message$m.location.yaml | 0 .../examples/m.room.message$m.notice.yaml | 0 .../m.room.message$m.server_notice.yaml | 0 .../examples/m.room.message$m.text.yaml | 0 .../examples/m.room.message$m.video.yaml | 0 .../examples/m.room.message.feedback.yaml | 0 .../event-schemas/examples/m.room.name.yaml | 0 .../examples/m.room.pinned_events.yaml | 0 .../examples/m.room.power_levels.yaml | 0 .../examples/m.room.redaction.yaml | 0 .../examples/m.room.server_acl.yaml | 0 .../examples/m.room.third_party_invite.yaml | 0 .../examples/m.room.tombstone.yaml | 0 .../event-schemas/examples/m.room.topic.yaml | 0 .../examples/m.room_key.withheld.yaml | 0 .../event-schemas/examples/m.room_key.yaml | 0 .../m.room_key_request$cancel_request.yaml | 0 .../examples/m.room_key_request$request.yaml | 0 .../event-schemas/examples/m.sticker.yaml | 0 .../event-schemas/examples/m.tag.yaml | 0 .../event-schemas/examples/m.typing.yaml | 0 .../moderation_policy_rule.yaml | 0 .../schema/core-event-schema/event.yaml | 0 .../msgtype_infos/image_info.yaml | 0 .../msgtype_infos/thumbnail_info.yaml | 0 .../schema/core-event-schema/room_event.yaml | 0 .../schema/core-event-schema/state_event.yaml | 0 .../core-event-schema/sync_room_event.yaml | 0 .../core-event-schema/sync_state_event.yaml | 0 .../core-event-schema/unsigned_prop.yaml | 0 .../schema/m.accepted_terms.yaml | 0 .../event-schemas/schema/m.call.answer.yaml | 0 .../schema/m.call.candidates.yaml | 0 .../event-schemas/schema/m.call.hangup.yaml | 0 .../event-schemas/schema/m.call.invite.yaml | 0 .../event-schemas/schema/m.direct.yaml | 0 .../event-schemas/schema/m.dummy.yaml | 0 .../schema/m.forwarded_room_key.yaml | 0 .../event-schemas/schema/m.fully_read.yaml | 0 .../schema/m.identity_server.yaml | 0 .../schema/m.ignored_user_list.yaml | 0 .../schema/m.key.verification.accept.yaml | 0 .../schema/m.key.verification.cancel.yaml | 0 .../schema/m.key.verification.key.yaml | 0 .../schema/m.key.verification.mac.yaml | 0 .../schema/m.key.verification.request.yaml | 0 .../m.key.verification.start$m.sas.v1.yaml | 0 .../schema/m.key.verification.start.yaml | 0 .../schema/m.policy.rule.room.yaml | 0 .../schema/m.policy.rule.server.yaml | 0 .../schema/m.policy.rule.user.yaml | 0 .../event-schemas/schema/m.presence.yaml | 0 .../event-schemas/schema/m.push_rules.yaml | 0 .../event-schemas/schema/m.receipt.yaml | 0 .../event-schemas/schema/m.room.avatar.yaml | 0 .../schema/m.room.canonical_alias.yaml | 0 .../event-schemas/schema/m.room.create.yaml | 0 .../schema/m.room.encrypted.yaml | 0 .../schema/m.room.encryption.yaml | 0 .../schema/m.room.guest_access.yaml | 0 .../schema/m.room.history_visibility.yaml | 0 .../schema/m.room.join_rules.yaml | 0 .../event-schemas/schema/m.room.member.yaml | 0 .../schema/m.room.message$m.audio.yaml | 0 .../schema/m.room.message$m.emote.yaml | 0 .../schema/m.room.message$m.file.yaml | 0 .../schema/m.room.message$m.image.yaml | 0 .../schema/m.room.message$m.location.yaml | 0 .../schema/m.room.message$m.notice.yaml | 0 .../m.room.message$m.server_notice.yaml | 0 .../schema/m.room.message$m.text.yaml | 0 .../schema/m.room.message$m.video.yaml | 0 .../schema/m.room.message.feedback.yaml | 0 .../event-schemas/schema/m.room.message.yaml | 0 .../event-schemas/schema/m.room.name.yaml | 0 .../schema/m.room.pinned_events.yaml | 0 .../schema/m.room.power_levels.yaml | 0 .../schema/m.room.redaction.yaml | 0 .../schema/m.room.server_acl.yaml | 0 .../schema/m.room.third_party_invite.yaml | 0 .../schema/m.room.tombstone.yaml | 0 .../event-schemas/schema/m.room.topic.yaml | 0 .../schema/m.room_key.withheld.yaml | 0 .../event-schemas/schema/m.room_key.yaml | 0 .../schema/m.room_key_request.yaml | 0 .../event-schemas/schema/m.sticker.yaml | 0 .../event-schemas/schema/m.tag.yaml | 0 .../event-schemas/schema/m.typing.yaml | 0 .../event-schemas}/schema/stripped_state.yaml | 0 .../schemas}/server-signatures.yaml | 0 event-schemas/README.md | 6 - ...api_extensions.md => openapi_extensions.md | 0 scripts/check-event-schema-examples.py | 9 +- 327 files changed, 82 insertions(+), 10822 deletions(-) delete mode 100644 api/README delete mode 120000 api/client-server/definitions/event-schemas delete mode 100644 api/files/backbone-min.js delete mode 100644 api/files/css delete mode 100644 api/files/handlebars-1.0.0.js delete mode 100644 api/files/highlight.7.3.pack.js delete mode 100644 api/files/jquery-1.8.0.min.js delete mode 100644 api/files/jquery.ba-bbq.min.js delete mode 100644 api/files/jquery.slideto.min.js delete mode 100644 api/files/jquery.wiggle.min.js delete mode 100644 api/files/reset.css delete mode 100644 api/files/screen.css delete mode 100644 api/files/shred.bundle.js delete mode 100644 api/files/swagger-oauth.js delete mode 100644 api/files/swagger-ui.js delete mode 100644 api/files/swagger.js delete mode 100644 api/files/underscore-min.js delete mode 100644 api/package.json delete mode 100644 api/validator.js rename {api => data/api}/application-service/definitions/location.yaml (100%) rename {api => data/api}/application-service/definitions/location_batch.yaml (100%) rename {api => data/api}/application-service/definitions/protocol.yaml (100%) rename {api => data/api}/application-service/definitions/protocol_metadata.yaml (100%) rename {api => data/api}/application-service/definitions/security.yaml (100%) rename {api => data/api}/application-service/definitions/user.yaml (100%) rename {api => data/api}/application-service/definitions/user_batch.yaml (100%) rename {api => data/api}/application-service/protocols.yaml (100%) rename {api => data/api}/application-service/query_room.yaml (100%) rename {api => data/api}/application-service/query_user.yaml (100%) rename {api => data/api}/application-service/transactions.yaml (98%) rename {api => data/api}/client-server/account-data.yaml (100%) rename {api => data/api}/client-server/admin.yaml (100%) rename {api => data/api}/client-server/administrative_contact.yaml (100%) rename {api => data/api}/client-server/appservice_room_directory.yaml (100%) rename {api => data/api}/client-server/banning.yaml (100%) rename {api => data/api}/client-server/capabilities.yaml (100%) rename {api => data/api}/client-server/content-repo.yaml (100%) rename {api => data/api}/client-server/create_room.yaml (100%) rename {api => data/api}/client-server/cross_signing.yaml (100%) rename {api => data/api}/client-server/definitions/auth_data.yaml (100%) rename {api => data/api}/client-server/definitions/auth_response.yaml (100%) rename {api => data/api}/client-server/definitions/client_device.yaml (100%) rename {api => data/api}/client-server/definitions/cross_signing_key.yaml (100%) rename {api => data/api}/client-server/definitions/device_keys.yaml (100%) rename {api => data/api}/client-server/definitions/errors/error.yaml (100%) rename {api => data/api}/client-server/definitions/errors/rate_limited.yaml (100%) rename {api => data/api}/client-server/definitions/event.yaml (100%) rename {api => data/api}/client-server/definitions/event_batch.yaml (90%) rename {api => data/api}/client-server/definitions/event_filter.yaml (100%) rename {api => data/api}/client-server/definitions/key_backup_data.yaml (100%) rename {api => data/api}/client-server/definitions/openid_token.yaml (100%) rename {api => data/api}/client-server/definitions/public_rooms_response.yaml (100%) rename {api => data/api}/client-server/definitions/push_condition.yaml (100%) rename {api => data/api}/client-server/definitions/push_rule.yaml (100%) rename {api => data/api}/client-server/definitions/push_ruleset.yaml (100%) rename {api => data/api}/client-server/definitions/request_email_validation.yaml (100%) rename {api => data/api}/client-server/definitions/request_msisdn_validation.yaml (100%) rename {api => data/api}/client-server/definitions/request_token_response.yaml (100%) rename {api => data/api}/client-server/definitions/room_event_batch.yaml (90%) rename {api => data/api}/client-server/definitions/room_event_filter.yaml (100%) rename {api => data/api}/client-server/definitions/room_key_backup.yaml (100%) rename {api => data/api}/client-server/definitions/security.yaml (100%) rename {api => data/api}/client-server/definitions/state_event_batch.yaml (90%) rename {api => data/api}/client-server/definitions/sync_filter.yaml (100%) rename {api => data/api}/client-server/definitions/third_party_signed.yaml (100%) rename {api => data/api}/client-server/definitions/timeline_batch.yaml (100%) rename {api => data/api}/client-server/definitions/user_identifier.yaml (100%) rename {api => data/api}/client-server/definitions/wellknown/full.yaml (100%) rename {api => data/api}/client-server/definitions/wellknown/homeserver.yaml (100%) rename {api => data/api}/client-server/definitions/wellknown/identity_server.yaml (100%) rename {api => data/api}/client-server/device_management.yaml (100%) rename {api => data/api}/client-server/directory.yaml (100%) rename {api => data/api}/client-server/event_context.yaml (85%) rename {api => data/api}/client-server/filter.yaml (100%) rename {api => data/api}/client-server/inviting.yaml (100%) rename {api => data/api}/client-server/joining.yaml (100%) rename {api => data/api}/client-server/key_backup.yaml (100%) rename {api => data/api}/client-server/keys.yaml (100%) rename {api => data/api}/client-server/kicking.yaml (100%) rename {api => data/api}/client-server/leaving.yaml (100%) rename {api => data/api}/client-server/list_joined_rooms.yaml (100%) rename {api => data/api}/client-server/list_public_rooms.yaml (100%) rename {api => data/api}/client-server/login.yaml (100%) rename {api => data/api}/client-server/logout.yaml (100%) rename {api => data/api}/client-server/message_pagination.yaml (92%) rename {api => data/api}/client-server/notifications.yaml (98%) rename {api => data/api}/client-server/old_sync.yaml (88%) rename {api => data/api}/client-server/openid.yaml (100%) rename {api => data/api}/client-server/peeking_events.yaml (95%) rename {api => data/api}/client-server/presence.yaml (100%) rename {api => data/api}/client-server/profile.yaml (100%) rename {api => data/api}/client-server/pusher.yaml (100%) rename {api => data/api}/client-server/pushrules.yaml (100%) rename {api => data/api}/client-server/read_markers.yaml (100%) rename {api => data/api}/client-server/receipts.yaml (100%) rename {api => data/api}/client-server/redaction.yaml (100%) rename {api => data/api}/client-server/registration.yaml (100%) rename {api => data/api}/client-server/report_content.yaml (100%) rename {api => data/api}/client-server/room_initial_sync.yaml (86%) rename {api => data/api}/client-server/room_send.yaml (100%) rename {api => data/api}/client-server/room_state.yaml (100%) rename {api => data/api}/client-server/room_upgrades.yaml (100%) rename {api => data/api}/client-server/rooms.yaml (93%) rename {api => data/api}/client-server/search.yaml (97%) rename {api => data/api}/client-server/sso_login_redirect.yaml (100%) rename {api => data/api}/client-server/sync.yaml (97%) rename {api => data/api}/client-server/tags.yaml (100%) rename {api => data/api}/client-server/third_party_lookup.yaml (100%) rename {api => data/api}/client-server/third_party_membership.yaml (100%) rename {api => data/api}/client-server/to_device.yaml (100%) rename {api => data/api}/client-server/typing.yaml (100%) rename {api => data/api}/client-server/users.yaml (100%) rename {api => data/api}/client-server/versions.yaml (100%) rename {api => data/api}/client-server/voip.yaml (100%) rename {api => data/api}/client-server/wellknown.yaml (100%) rename {api => data/api}/client-server/whoami.yaml (100%) rename {api => data/api}/identity/associations.yaml (100%) rename {api => data/api}/identity/definitions/request_email_validation.yaml (100%) rename {api => data/api}/identity/definitions/request_msisdn_validation.yaml (100%) rename {api => data/api}/identity/definitions/security.yaml (100%) rename {api => data/api}/identity/definitions/sid.yaml (100%) rename {api => data/api}/identity/email_associations.yaml (100%) rename {api => data/api}/identity/invitation_signing.yaml (100%) rename {api => data/api}/identity/lookup.yaml (100%) rename {api => data/api}/identity/phone_associations.yaml (100%) rename {api => data/api}/identity/ping.yaml (100%) rename {api => data/api}/identity/pubkey.yaml (100%) rename {api => data/api}/identity/store_invite.yaml (100%) rename {api => data/api}/identity/v2_associations.yaml (100%) rename {api => data/api}/identity/v2_auth.yaml (100%) rename {api => data/api}/identity/v2_email_associations.yaml (100%) rename {api => data/api}/identity/v2_invitation_signing.yaml (100%) rename {api => data/api}/identity/v2_lookup.yaml (100%) rename {api => data/api}/identity/v2_phone_associations.yaml (100%) rename {api => data/api}/identity/v2_ping.yaml (100%) rename {api => data/api}/identity/v2_pubkey.yaml (100%) rename {api => data/api}/identity/v2_store_invite.yaml (100%) rename {api => data/api}/identity/v2_terms.yaml (100%) rename {api => data/api}/push-gateway/push_notifier.yaml (100%) rename {api => data/api}/server-server/backfill.yaml (100%) rename {api => data/api}/server-server/definitions/edu.yaml (100%) rename {api => data/api}/server-server/definitions/event-schemas/m.device_list_update.yaml (100%) rename {api => data/api}/server-server/definitions/event-schemas/m.direct_to_device.yaml (100%) rename {api => data/api}/server-server/definitions/event-schemas/m.presence.yaml (100%) rename {api => data/api}/server-server/definitions/event-schemas/m.receipt.yaml (100%) rename {api => data/api}/server-server/definitions/event-schemas/m.signing_key_update.yaml (100%) rename {api => data/api}/server-server/definitions/event-schemas/m.typing.yaml (100%) rename {api => data/api}/server-server/definitions/invite_event.yaml (100%) rename {api => data/api}/server-server/definitions/keys.yaml (100%) rename {api => data/api}/server-server/definitions/keys_query_response.yaml (100%) rename {api => data/api}/server-server/definitions/pdu.yaml (100%) rename {api => data/api}/server-server/definitions/pdu_v3.yaml (100%) rename {api => data/api}/server-server/definitions/pdu_v4.yaml (100%) rename {api => data/api}/server-server/definitions/security.yaml (100%) rename {api => data/api}/server-server/definitions/send_join_response.yaml (100%) rename {api => data/api}/server-server/definitions/single_pdu_transaction.yaml (100%) rename {api => data/api}/server-server/definitions/transaction.yaml (100%) rename {api => data/api}/server-server/definitions/unlimited_pdu_transaction.yaml (100%) rename {api => data/api}/server-server/definitions/unsigned_pdu.yaml (100%) rename {api => data/api}/server-server/definitions/unsigned_pdu_base.yaml (100%) rename {api => data/api}/server-server/event_auth.yaml (100%) rename {api => data/api}/server-server/events.yaml (100%) rename {api => data/api}/server-server/examples/edu.json (100%) rename {api => data/api}/server-server/examples/minimal_pdu.json (100%) rename {api => data/api}/server-server/examples/pdu.json (100%) rename {api => data/api}/server-server/examples/pdu_v3.json (100%) rename {api => data/api}/server-server/examples/pdu_v4.json (100%) rename {api => data/api}/server-server/examples/server_key.json (100%) rename {api => data/api}/server-server/examples/server_key_notary_signed.json (100%) rename {api => data/api}/server-server/examples/transaction.json (100%) rename {api => data/api}/server-server/examples/unsigned_pdu.json (100%) rename {api => data/api}/server-server/examples/unsigned_pdu_base.json (100%) rename {api => data/api}/server-server/invites-v1.yaml (98%) rename {api => data/api}/server-server/invites-v2.yaml (98%) rename {api => data/api}/server-server/joins-v1.yaml (100%) rename {api => data/api}/server-server/joins-v2.yaml (100%) rename {api => data/api}/server-server/keys_query.yaml (100%) rename {api => data/api}/server-server/keys_server.yaml (100%) rename {api => data/api}/server-server/leaving-v1.yaml (100%) rename {api => data/api}/server-server/leaving-v2.yaml (100%) rename {api => data/api}/server-server/openid.yaml (100%) rename {api => data/api}/server-server/public_rooms.yaml (100%) rename {api => data/api}/server-server/query.yaml (100%) rename {api => data/api}/server-server/third_party_invite.yaml (100%) rename {api => data/api}/server-server/transactions.yaml (100%) rename {api => data/api}/server-server/user_devices.yaml (100%) rename {api => data/api}/server-server/user_keys.yaml (100%) rename {api => data/api}/server-server/version.yaml (100%) rename {api => data/api}/server-server/wellknown.yaml (100%) rename {event-schemas => data/event-schemas}/examples/core/event.json (100%) rename {event-schemas => data/event-schemas}/examples/core/room_edu.json (100%) rename {event-schemas => data/event-schemas}/examples/core/room_event.json (100%) rename {event-schemas => data/event-schemas}/examples/core/state_event.json (100%) rename {event-schemas => data/event-schemas}/examples/invite_room_state.json (100%) rename event-schemas/examples/m.accepted_terms => data/event-schemas/examples/m.accepted_terms.yaml (100%) rename event-schemas/examples/m.call.answer => data/event-schemas/examples/m.call.answer.yaml (100%) rename event-schemas/examples/m.call.candidates => data/event-schemas/examples/m.call.candidates.yaml (100%) rename event-schemas/examples/m.call.hangup => data/event-schemas/examples/m.call.hangup.yaml (100%) rename event-schemas/examples/m.call.invite => data/event-schemas/examples/m.call.invite.yaml (100%) rename event-schemas/examples/m.direct => data/event-schemas/examples/m.direct.yaml (100%) rename event-schemas/examples/m.dummy => data/event-schemas/examples/m.dummy.yaml (100%) rename event-schemas/examples/m.forwarded_room_key => data/event-schemas/examples/m.forwarded_room_key.yaml (100%) rename event-schemas/examples/m.fully_read => data/event-schemas/examples/m.fully_read.yaml (100%) rename event-schemas/examples/m.identity_server => data/event-schemas/examples/m.identity_server.yaml (100%) rename event-schemas/examples/m.ignored_user_list => data/event-schemas/examples/m.ignored_user_list.yaml (100%) rename event-schemas/examples/m.key.verification.accept => data/event-schemas/examples/m.key.verification.accept.yaml (100%) rename event-schemas/examples/m.key.verification.cancel => data/event-schemas/examples/m.key.verification.cancel.yaml (100%) rename event-schemas/examples/m.key.verification.key => data/event-schemas/examples/m.key.verification.key.yaml (100%) rename event-schemas/examples/m.key.verification.mac => data/event-schemas/examples/m.key.verification.mac.yaml (100%) rename event-schemas/examples/m.key.verification.request => data/event-schemas/examples/m.key.verification.request.yaml (100%) rename event-schemas/examples/m.key.verification.start$m.sas.v1 => data/event-schemas/examples/m.key.verification.start$m.sas.v1.yaml (100%) rename event-schemas/examples/m.key.verification.start => data/event-schemas/examples/m.key.verification.start.yaml (100%) rename event-schemas/examples/m.policy.rule.room => data/event-schemas/examples/m.policy.rule.room.yaml (100%) rename event-schemas/examples/m.policy.rule.server => data/event-schemas/examples/m.policy.rule.server.yaml (100%) rename event-schemas/examples/m.policy.rule.user => data/event-schemas/examples/m.policy.rule.user.yaml (100%) rename event-schemas/examples/m.presence => data/event-schemas/examples/m.presence.yaml (100%) rename event-schemas/examples/m.push_rules => data/event-schemas/examples/m.push_rules.yaml (100%) rename event-schemas/examples/m.receipt => data/event-schemas/examples/m.receipt.yaml (100%) rename event-schemas/examples/m.room.avatar => data/event-schemas/examples/m.room.avatar.yaml (100%) rename event-schemas/examples/m.room.canonical_alias => data/event-schemas/examples/m.room.canonical_alias.yaml (100%) rename event-schemas/examples/m.room.create => data/event-schemas/examples/m.room.create.yaml (100%) rename event-schemas/examples/m.room.encrypted$megolm => data/event-schemas/examples/m.room.encrypted$megolm.yaml (100%) rename event-schemas/examples/m.room.encrypted$olm => data/event-schemas/examples/m.room.encrypted$olm.yaml (100%) rename event-schemas/examples/m.room.encryption => data/event-schemas/examples/m.room.encryption.yaml (100%) rename event-schemas/examples/m.room.guest_access => data/event-schemas/examples/m.room.guest_access.yaml (100%) rename event-schemas/examples/m.room.history_visibility => data/event-schemas/examples/m.room.history_visibility.yaml (100%) rename event-schemas/examples/m.room.join_rules => data/event-schemas/examples/m.room.join_rules.yaml (100%) rename event-schemas/examples/m.room.member$invite_room_state => data/event-schemas/examples/m.room.member$invite_room_state.yaml (90%) rename event-schemas/examples/m.room.member$third_party_invite => data/event-schemas/examples/m.room.member$third_party_invite.yaml (93%) rename event-schemas/examples/m.room.member => data/event-schemas/examples/m.room.member.yaml (100%) rename event-schemas/examples/m.room.message$m.audio => data/event-schemas/examples/m.room.message$m.audio.yaml (100%) rename event-schemas/examples/m.room.message$m.emote => data/event-schemas/examples/m.room.message$m.emote.yaml (100%) rename event-schemas/examples/m.room.message$m.file => data/event-schemas/examples/m.room.message$m.file.yaml (100%) rename event-schemas/examples/m.room.message$m.image => data/event-schemas/examples/m.room.message$m.image.yaml (100%) rename event-schemas/examples/m.room.message$m.location => data/event-schemas/examples/m.room.message$m.location.yaml (100%) rename event-schemas/examples/m.room.message$m.notice => data/event-schemas/examples/m.room.message$m.notice.yaml (100%) rename event-schemas/examples/m.room.message$m.server_notice => data/event-schemas/examples/m.room.message$m.server_notice.yaml (100%) rename event-schemas/examples/m.room.message$m.text => data/event-schemas/examples/m.room.message$m.text.yaml (100%) rename event-schemas/examples/m.room.message$m.video => data/event-schemas/examples/m.room.message$m.video.yaml (100%) rename event-schemas/examples/m.room.message.feedback => data/event-schemas/examples/m.room.message.feedback.yaml (100%) rename event-schemas/examples/m.room.name => data/event-schemas/examples/m.room.name.yaml (100%) rename event-schemas/examples/m.room.pinned_events => data/event-schemas/examples/m.room.pinned_events.yaml (100%) rename event-schemas/examples/m.room.power_levels => data/event-schemas/examples/m.room.power_levels.yaml (100%) rename event-schemas/examples/m.room.redaction => data/event-schemas/examples/m.room.redaction.yaml (100%) rename event-schemas/examples/m.room.server_acl => data/event-schemas/examples/m.room.server_acl.yaml (100%) rename event-schemas/examples/m.room.third_party_invite => data/event-schemas/examples/m.room.third_party_invite.yaml (100%) rename event-schemas/examples/m.room.tombstone => data/event-schemas/examples/m.room.tombstone.yaml (100%) rename event-schemas/examples/m.room.topic => data/event-schemas/examples/m.room.topic.yaml (100%) rename event-schemas/examples/m.room_key.withheld => data/event-schemas/examples/m.room_key.withheld.yaml (100%) rename event-schemas/examples/m.room_key => data/event-schemas/examples/m.room_key.yaml (100%) rename event-schemas/examples/m.room_key_request$cancel_request => data/event-schemas/examples/m.room_key_request$cancel_request.yaml (100%) rename event-schemas/examples/m.room_key_request$request => data/event-schemas/examples/m.room_key_request$request.yaml (100%) rename event-schemas/examples/m.sticker => data/event-schemas/examples/m.sticker.yaml (100%) rename event-schemas/examples/m.tag => data/event-schemas/examples/m.tag.yaml (100%) rename event-schemas/examples/m.typing => data/event-schemas/examples/m.typing.yaml (100%) rename {event-schemas => data/event-schemas}/moderation_policy_rule.yaml (100%) rename {event-schemas => data/event-schemas}/schema/core-event-schema/event.yaml (100%) rename {event-schemas => data/event-schemas}/schema/core-event-schema/msgtype_infos/image_info.yaml (100%) rename {event-schemas => data/event-schemas}/schema/core-event-schema/msgtype_infos/thumbnail_info.yaml (100%) rename {event-schemas => data/event-schemas}/schema/core-event-schema/room_event.yaml (100%) rename {event-schemas => data/event-schemas}/schema/core-event-schema/state_event.yaml (100%) rename {event-schemas => data/event-schemas}/schema/core-event-schema/sync_room_event.yaml (100%) rename {event-schemas => data/event-schemas}/schema/core-event-schema/sync_state_event.yaml (100%) rename {event-schemas => data/event-schemas}/schema/core-event-schema/unsigned_prop.yaml (100%) rename event-schemas/schema/m.accepted_terms => data/event-schemas/schema/m.accepted_terms.yaml (100%) rename event-schemas/schema/m.call.answer => data/event-schemas/schema/m.call.answer.yaml (100%) rename event-schemas/schema/m.call.candidates => data/event-schemas/schema/m.call.candidates.yaml (100%) rename event-schemas/schema/m.call.hangup => data/event-schemas/schema/m.call.hangup.yaml (100%) rename event-schemas/schema/m.call.invite => data/event-schemas/schema/m.call.invite.yaml (100%) rename event-schemas/schema/m.direct => data/event-schemas/schema/m.direct.yaml (100%) rename event-schemas/schema/m.dummy => data/event-schemas/schema/m.dummy.yaml (100%) rename event-schemas/schema/m.forwarded_room_key => data/event-schemas/schema/m.forwarded_room_key.yaml (100%) rename event-schemas/schema/m.fully_read => data/event-schemas/schema/m.fully_read.yaml (100%) rename event-schemas/schema/m.identity_server => data/event-schemas/schema/m.identity_server.yaml (100%) rename event-schemas/schema/m.ignored_user_list => data/event-schemas/schema/m.ignored_user_list.yaml (100%) rename event-schemas/schema/m.key.verification.accept => data/event-schemas/schema/m.key.verification.accept.yaml (100%) rename event-schemas/schema/m.key.verification.cancel => data/event-schemas/schema/m.key.verification.cancel.yaml (100%) rename event-schemas/schema/m.key.verification.key => data/event-schemas/schema/m.key.verification.key.yaml (100%) rename event-schemas/schema/m.key.verification.mac => data/event-schemas/schema/m.key.verification.mac.yaml (100%) rename event-schemas/schema/m.key.verification.request => data/event-schemas/schema/m.key.verification.request.yaml (100%) rename event-schemas/schema/m.key.verification.start$m.sas.v1 => data/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml (100%) rename event-schemas/schema/m.key.verification.start => data/event-schemas/schema/m.key.verification.start.yaml (100%) rename event-schemas/schema/m.policy.rule.room => data/event-schemas/schema/m.policy.rule.room.yaml (100%) rename event-schemas/schema/m.policy.rule.server => data/event-schemas/schema/m.policy.rule.server.yaml (100%) rename event-schemas/schema/m.policy.rule.user => data/event-schemas/schema/m.policy.rule.user.yaml (100%) rename event-schemas/schema/m.presence => data/event-schemas/schema/m.presence.yaml (100%) rename event-schemas/schema/m.push_rules => data/event-schemas/schema/m.push_rules.yaml (100%) rename event-schemas/schema/m.receipt => data/event-schemas/schema/m.receipt.yaml (100%) rename event-schemas/schema/m.room.avatar => data/event-schemas/schema/m.room.avatar.yaml (100%) rename event-schemas/schema/m.room.canonical_alias => data/event-schemas/schema/m.room.canonical_alias.yaml (100%) rename event-schemas/schema/m.room.create => data/event-schemas/schema/m.room.create.yaml (100%) rename event-schemas/schema/m.room.encrypted => data/event-schemas/schema/m.room.encrypted.yaml (100%) rename event-schemas/schema/m.room.encryption => data/event-schemas/schema/m.room.encryption.yaml (100%) rename event-schemas/schema/m.room.guest_access => data/event-schemas/schema/m.room.guest_access.yaml (100%) rename event-schemas/schema/m.room.history_visibility => data/event-schemas/schema/m.room.history_visibility.yaml (100%) rename event-schemas/schema/m.room.join_rules => data/event-schemas/schema/m.room.join_rules.yaml (100%) rename event-schemas/schema/m.room.member => data/event-schemas/schema/m.room.member.yaml (100%) rename event-schemas/schema/m.room.message$m.audio => data/event-schemas/schema/m.room.message$m.audio.yaml (100%) rename event-schemas/schema/m.room.message$m.emote => data/event-schemas/schema/m.room.message$m.emote.yaml (100%) rename event-schemas/schema/m.room.message$m.file => data/event-schemas/schema/m.room.message$m.file.yaml (100%) rename event-schemas/schema/m.room.message$m.image => data/event-schemas/schema/m.room.message$m.image.yaml (100%) rename event-schemas/schema/m.room.message$m.location => data/event-schemas/schema/m.room.message$m.location.yaml (100%) rename event-schemas/schema/m.room.message$m.notice => data/event-schemas/schema/m.room.message$m.notice.yaml (100%) rename event-schemas/schema/m.room.message$m.server_notice => data/event-schemas/schema/m.room.message$m.server_notice.yaml (100%) rename event-schemas/schema/m.room.message$m.text => data/event-schemas/schema/m.room.message$m.text.yaml (100%) rename event-schemas/schema/m.room.message$m.video => data/event-schemas/schema/m.room.message$m.video.yaml (100%) rename event-schemas/schema/m.room.message.feedback => data/event-schemas/schema/m.room.message.feedback.yaml (100%) rename event-schemas/schema/m.room.message => data/event-schemas/schema/m.room.message.yaml (100%) rename event-schemas/schema/m.room.name => data/event-schemas/schema/m.room.name.yaml (100%) rename event-schemas/schema/m.room.pinned_events => data/event-schemas/schema/m.room.pinned_events.yaml (100%) rename event-schemas/schema/m.room.power_levels => data/event-schemas/schema/m.room.power_levels.yaml (100%) rename event-schemas/schema/m.room.redaction => data/event-schemas/schema/m.room.redaction.yaml (100%) rename event-schemas/schema/m.room.server_acl => data/event-schemas/schema/m.room.server_acl.yaml (100%) rename event-schemas/schema/m.room.third_party_invite => data/event-schemas/schema/m.room.third_party_invite.yaml (100%) rename event-schemas/schema/m.room.tombstone => data/event-schemas/schema/m.room.tombstone.yaml (100%) rename event-schemas/schema/m.room.topic => data/event-schemas/schema/m.room.topic.yaml (100%) rename event-schemas/schema/m.room_key.withheld => data/event-schemas/schema/m.room_key.withheld.yaml (100%) rename event-schemas/schema/m.room_key => data/event-schemas/schema/m.room_key.yaml (100%) rename event-schemas/schema/m.room_key_request => data/event-schemas/schema/m.room_key_request.yaml (100%) rename event-schemas/schema/m.sticker => data/event-schemas/schema/m.sticker.yaml (100%) rename event-schemas/schema/m.tag => data/event-schemas/schema/m.tag.yaml (100%) rename event-schemas/schema/m.typing => data/event-schemas/schema/m.typing.yaml (100%) rename {event-schemas => data/event-schemas}/schema/stripped_state.yaml (100%) rename {schemas => data/schemas}/server-signatures.yaml (100%) delete mode 100644 event-schemas/README.md rename api/openapi_extensions.md => openapi_extensions.md (100%) diff --git a/api/README b/api/README deleted file mode 100644 index 7b971fac..00000000 --- a/api/README +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains swagger-compatible representations of our APIs. See -the main README.rst for details on how to make use of them. diff --git a/api/client-server/definitions/event-schemas b/api/client-server/definitions/event-schemas deleted file mode 120000 index 376cf90c..00000000 --- a/api/client-server/definitions/event-schemas +++ /dev/null @@ -1 +0,0 @@ -../../../event-schemas \ No newline at end of file diff --git a/api/files/backbone-min.js b/api/files/backbone-min.js deleted file mode 100644 index c1c0d4ff..00000000 --- a/api/files/backbone-min.js +++ /dev/null @@ -1,38 +0,0 @@ -// Backbone.js 0.9.2 - -// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. -// Backbone may be freely distributed under the MIT license. -// For all details and documentation: -// http://backbonejs.org -(function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks= -{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g= -z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent= -{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null== -b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent: -b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)}; -a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error, -h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t(); -return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending= -{};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length|| -!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator); -this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=i('