mirror of
https://github.com/github/codeql.git
synced 2026-05-04 05:05:12 +02:00
rename more acronyms
This commit is contained in:
@@ -3,15 +3,15 @@ import javascript
|
||||
string httpVerb() { result = ["get", "put", "post", "delete"] }
|
||||
|
||||
/** A RAML specification. */
|
||||
class RamlSpec extends YAMLDocument, YAMLMapping {
|
||||
class RamlSpec extends YamlDocument, YamlMapping {
|
||||
RamlSpec() { getLocation().getFile().getExtension() = "raml" }
|
||||
}
|
||||
|
||||
/** A RAML resource specification. */
|
||||
class RamlResource extends YAMLMapping {
|
||||
class RamlResource extends YamlMapping {
|
||||
RamlResource() {
|
||||
getDocument() instanceof RamlSpec and
|
||||
exists(YAMLMapping m, string name |
|
||||
exists(YamlMapping m, string name |
|
||||
this = m.lookup(name) and
|
||||
name.matches("/%")
|
||||
)
|
||||
@@ -35,16 +35,16 @@ class RamlResource extends YAMLMapping {
|
||||
}
|
||||
|
||||
/** A RAML method specification. */
|
||||
class RamlMethod extends YAMLValue {
|
||||
class RamlMethod extends YamlValue {
|
||||
RamlMethod() {
|
||||
getDocument() instanceof RamlSpec and
|
||||
exists(YAMLMapping obj | this = obj.lookup(httpVerb()))
|
||||
exists(YamlMapping obj | this = obj.lookup(httpVerb()))
|
||||
}
|
||||
|
||||
/** Get the response specification for the given status code. */
|
||||
YAMLValue getResponse(int code) {
|
||||
exists(YAMLMapping obj, string s |
|
||||
obj = this.(YAMLMapping).lookup("responses") and
|
||||
YamlValue getResponse(int code) {
|
||||
exists(YamlMapping obj, string s |
|
||||
obj = this.(YamlMapping).lookup("responses") and
|
||||
result = obj.lookup(s) and
|
||||
code = s.toInt()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user