rename more acronyms

This commit is contained in:
erik-krogh
2022-08-24 12:59:07 +02:00
parent 06afe9c0f4
commit cc7a9ef97a
93 changed files with 693 additions and 451 deletions

View File

@@ -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()
)