{ "name": "HTTP Spec", "scopeName": "source.httpspec", "fileTypes": [ "httpspec" ], "uuid": "7bb6ff35-8b8a-4480-91ec-20f2d3fcba9a", "patterns": [ { "name": "meta.request.httpspec", "patterns": [ { "include": "#request" }, { "match": "^$" }, { "include": "#response" } ] } ], "repository": { "multiplex": { "begin": "(\\[)", "end": "\\]", "beginCaptures": { "0": { "name": "keyword.other" } }, "endCaptures": { "0": { "name": "keyword.other" } }, "patterns": [ { "include": "#uripart" }, { "include": "#comma" } ] }, "header": { "patterns": [ { "name": "string.unquoted.uri.httpspec", "match": "^([a-zA-Z\\-_]+\\:)\\s(.*)$", "captures": { "1": { "name": "variable.parameter.headername.httpspec" } } } ] }, "response": { "patterns": [ { "include": "#statusline" }, { "include": "#header" }, { "include": "#jsonblock" } ] }, "jsonblock": { "patterns": [ { "include": "source.json" } ] }, "statusline": { "patterns": [ { "match": "^(\\d\\d\\d)\\s(.*)$", "captures": { "0": { "name": "constant.language.statustext.httpspec" } } } ] }, "request": { "patterns": [ { "begin": "^(?=OPTIONS|HEAD|GET|DELETE|PUT|PATCH|POST)", "end": "^(?=\\d\\d\\d)", "patterns": [ { "include": "#requestline" }, { "include": "#header" }, { "include": "#jsonblock" } ] } ] }, "openingbracket": { "patterns": [ { "name": "keyword.other.multiplexstart.httpspec", "match": "\\[" } ] }, "closingbracket": { "patterns": [ { "name": "keyword.other.multiplexend.httpspec" }, { "match": "\\]" } ] }, "emptyline": { "patterns": [ { "match": "^\\s*$" } ] }, "requestline": { "patterns": [ { "include": "#methodlist" }, { "include": "#uri" } ] }, "methodlist": { "patterns": [ { "include": "#methodname" }, { "include": "#invalidcomma" }, { "include": "#comma" } ] }, "methodname": { "patterns": [ { "name": "keyword.other.method.httpspec", "match": "(?:\\b)(OPTIONS|HEAD|GET|DELETE|PUT|PATCH|POST)" } ] }, "comma": { "patterns": [ { "name": "keyword.other.comma.httpspec.test", "match": "\\," } ] }, "invalidcomma": { "patterns": [ { "name": "invalid.illegal.comma.httpspec", "match": "^\\,|\\,(?=\\s)" } ] }, "uri": { "patterns": [ { "include": "#uripath" }, { "include": "#multiplex" }, { "include": "#questionmark" }, { "include": "#uriquery" } ] }, "uripath": { "patterns": [ { "name": "support.function.httpspec", "begin": "(?:\\s)\\/", "end": "(?:$)", "patterns": [ { "include": "#uripart" }, { "include": "#multiplex" } ] } ] }, "uripart": { "patterns": [ { "match": "([a-bA-B0-9\\-_/]+)" } ] }, "questionmark": { "patterns": [ { "name": "support.function.queryseparator.httpspec", "match": "\\?" } ] }, "uriquery": { "patterns": [ { "include": "#namevaluepair" }, { "include": "#ampersand" } ] }, "namevaluepair": { "patterns": [ { "include": "#uriqueryname" }, { "include": "#equals" }, { "include": "#uriqueryvalue" } ] }, "uriqueryname": { "patterns": [ { "name": "support.function.uriqueryname.httpspec", "match": "(?<=[?&])([^=&])+" } ] }, "equals": { "patterns": [ { "name": "support.function.keyvaluepairseparator.httpspec", "match": "\\=" } ] }, "uriqueryvalue": { "patterns": [ { "name": "support.function.uriqueryvalue.httpspec", "match": "(?<=\\=)([^=&]+)" } ] }, "ampersand": { "patterns": [ { "name": "support.function.ampersand.httpspec", "match": "(?