From 3f7b284176302e8d6e5e401a6a173c64ed80171a Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 16:30:24 -0500 Subject: [PATCH 01/43] update comments to describe current usage of server environment --- src/grammar/servers.pegjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grammar/servers.pegjs b/src/grammar/servers.pegjs index 962bca2c..6dfa0fcb 100644 --- a/src/grammar/servers.pegjs +++ b/src/grammar/servers.pegjs @@ -3,7 +3,8 @@ // Here's how it works: // - there are 2 types of servers - REST and EVENTS -// - each server entry starts with a URL. it can then specify an optional environment (default = TEST), and an optional protocol +// - each server entry starts with a URL, an environment name, and an optional protocol +// - during swagger generation runtime, a default PROD server will be added (see src/library/servers.reslang & LOCAL_SERVERS_INCLUDE in src/genbase.ts) // - variables can be specified in the URL - using the syntax {variable_name[:optional_default]} // - the variables are taken from variables passed in through the command line switch: --var port=8020 From 100eaae848badf049a706108d7f493cf58177daf Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 16:39:11 -0500 Subject: [PATCH 02/43] expose env to cli args --- src/genbase.ts | 2 +- src/main.ts | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/genbase.ts b/src/genbase.ts index 79aa40de..3a9a4fca 100644 --- a/src/genbase.ts +++ b/src/genbase.ts @@ -139,7 +139,7 @@ export abstract class BaseGen { public constructor( private dirs: string[], protected rules: IRules, - protected environment: string = "PROD", + protected environment: string, protected vars: string = "", expandInlines = false, protected omitNamespace = false, diff --git a/src/main.ts b/src/main.ts index 81205f4d..5d06cbba 100755 --- a/src/main.ts +++ b/src/main.ts @@ -89,6 +89,7 @@ const args = yargs }) .option("env", { type: "string", + "default": "PROD", describe: "Specify environment for including urls in the server block. Defaults to PROD" }) @@ -166,7 +167,7 @@ function handle(allFiles: string[], silent: boolean, throwErrors = false) { try { // generate a parse tree? if (args.parsed) { - const json = new ParseGen(allFiles, rules).generate() + const json = new ParseGen(allFiles, rules, args.env).generate() if (args.stdout) { console.log(json) } else { @@ -176,7 +177,7 @@ function handle(allFiles: string[], silent: boolean, throwErrors = false) { } else if (args.stripped) { // pretty print the reslang in stripped down form const file = tmp.fileSync({ postfix: ".html" }) - const html = new StripGen(allFiles, rules).generate(!args.plain) + const html = new StripGen(allFiles, rules, args.env).generate(!args.plain) if (!args.stdout) tryClip(html, "html", false) if (args.open) { writeFile(html, file.name) @@ -184,7 +185,7 @@ function handle(allFiles: string[], silent: boolean, throwErrors = false) { } } else if (args.diagram) { // generate .viz? - const dot = new DotvizGen(allFiles, rules) + const dot = new DotvizGen(allFiles, rules, args.env) const dotviz = dot.generate(args.diagram) if (args.stdout) { console.log(dotviz) @@ -200,7 +201,7 @@ function handle(allFiles: string[], silent: boolean, throwErrors = false) { const events = new EventsGen( allFiles, rules, - args.env || "PROD", + args.env, args.vars, true, false, @@ -233,7 +234,7 @@ function handle(allFiles: string[], silent: boolean, throwErrors = false) { const jsonSchema = new JsonSchemaGen( allFiles, rules, - args.env || "PROD", + args.env, args.vars, true, false, @@ -253,7 +254,7 @@ function handle(allFiles: string[], silent: boolean, throwErrors = false) { const swag = new SwagGen( allFiles, rules, - args.env || "PROD", + args.env, args.vars, true, args.omitnamespace From 8af2cc1f78de1c4541967cb94e7d17b7404cd048 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 16:51:06 -0500 Subject: [PATCH 03/43] Add html railroad diagram for reslang --- docs/bnf/railroad-for-reslang.html | 9040 ++++++++++++++++++++++++++++ 1 file changed, 9040 insertions(+) create mode 100644 docs/bnf/railroad-for-reslang.html diff --git a/docs/bnf/railroad-for-reslang.html b/docs/bnf/railroad-for-reslang.html new file mode 100644 index 00000000..cb15118f --- /dev/null +++ b/docs/bnf/railroad-for-reslang.html @@ -0,0 +1,9040 @@ + + + + + Railroad diagram for 11 + + + + + +
+

11

+

+
+

reslang

+
+ + + + + + + + + + + + + + + + + + + + + + + + +namespacedefinition + + + + + + + +import + + + + + + + +servers + + + + + + + +tag + + + + + + + +resource + + + + + + + +subresource + + + + + + + +action + + + + + + + +structure + + + + + + + +httpHeader + + + + + + + +enum + + + + + + + +event + + + + + + + +produces + + + + + + + +consumes + + + + + + + +diagram + + + + + + + +docs + + + + + + + + + + + + + + + + +
+
+ Used by: +
+ +
+
+

namespacedefinition

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + +namespace + + + + + + + +_ + + + + + + + + + + + + + + + +space + + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + +title + + + + + + + +_ + + + + + + + +description + + + + + + + +_ + + + + + + + +_ + + + + + + + +version + + + + + + + +_ + + + + + + + +semver + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + description + space + semver +
+
+
+

space

+
+ + + + + + + + + + + +_ + + + + + + + + + + + +[a-zA-Z0-9-_/] + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + namespacedefinition +
+
+ References: + _ +
+
+
+

import

+
+ + + + + + + + + + + +_ + + + + + + + +import + + + + + + + +_ + + + + + + + +filename + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + filename +
+
+
+

diagram

+
+ + + + + + + + + + + +_ + + + + + + + +diagram + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + +layout + + + + + + + + +_ + + + + + + + + + + + + + + + +includeAll + + + + + + + + +_ + + + + + + + + + + + + + + + +includes + + + + + + + + +_ + + + + + + + + + + + + + + + +dimports + + + + + + + + +_ + + + + + + + + + + + + + + + +excludes + + + + + + + + +_ + + + + + + + + + + + + + + + +folds + + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +group + + + + + + + + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + name + layout + includeAll + includes + dimports + excludes + folds + group +
+
+
+

layout

+
+ + + + + + + + + + + +_ + + + + + + + +layout + + + + + + + +_ + + + + + + + +LR + + + + + + + +
+
+ Used by: + diagram +
+
+ References: + _ +
+
+
+

includeAll

+
+ + + + + + + + + + + +/includeAll + + + + + + + +_ + + + + + + + +filename + + + + + + + +.reslang + + + + + + + +
+
+ Used by: + diagram +
+
+ References: + _ + filename +
+
+
+

includes

+
+ + + + + + + + + + + +_ + + + + + + + +/include + + + + + + + +_ + + + + + + + + + + + +include + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + diagram +
+
+ References: + _ + include +
+
+
+

include

+
+ + + + + + + + + + + +_ + + + + + + + +ref + + + + + + + +_ + + + + + + + +
+
+ Used by: + includes + group +
+
+ References: + _ + ref +
+
+
+

group

+
+ + + + + + + + + + + +_ + + + + + + + +/group + + + + + + + +_ + + + + + + + +description + + + + + + + +_ + + + + + + + + + + + +include + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + diagram +
+
+ References: + _ + description + include +
+
+
+

dimports

+
+ + + + + + + + + + + +_ + + + + + + + +/import + + + + + + + +_ + + + + + + + + + + + +dimport + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + diagram +
+
+ References: + _ + dimport +
+
+
+

dimport

+
+ + + + + + + + + + + +_ + + + + + + + +ref + + + + + + + +_ + + + + + + + +
+
+ Used by: + dimports +
+
+ References: + _ + ref +
+
+
+

excludes

+
+ + + + + + + + + + + +_ + + + + + + + +/exclude + + + + + + + +_ + + + + + + + + + + + +exclude + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + diagram +
+
+ References: + _ + exclude +
+
+
+

exclude

+
+ + + + + + + + + + + +_ + + + + + + + +ref + + + + + + + +_ + + + + + + + +
+
+ Used by: + excludes +
+
+ References: + _ + ref +
+
+
+

folds

+
+ + + + + + + + + + + +_ + + + + + + + +/fold + + + + + + + +_ + + + + + + + + + + + +fold + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + diagram +
+
+ References: + _ + fold +
+
+
+

fold

+
+ + + + + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + +of + + + + + + + +_ + + + + + + + +ref + + + + + + + +_ + + + + + + + +
+
+ Used by: + folds +
+
+ References: + _ + name + ref +
+
+
+

event

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + +event + + + + + + + +_ + + + + + + + +resname + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + +header + + + + + + + + +_ + + + + + + + + + + + + + + + +payload + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + description + resname + header + payload +
+
+
+ +
+ + + + + + + + + + + +_ + + + + + + + +/header + + + + + + + +_ + + + + + + + + + + + +attributes + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + event +
+
+ References: + _ + attributes +
+
+
+

payload

+
+ + + + + + + + + + + +_ + + + + + + + +/payload + + + + + + + +_ + + + + + + + + + + + +attributes + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + event +
+
+ References: + _ + attributes +
+
+
+

produces

+
+ + + + + + + + + + + +_ + + + + + + + +produces + + + + + + + +_ + + + + + + + +ref + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + ref +
+
+
+

consumes

+
+ + + + + + + + + + + +_ + + + + + + + +consumes + + + + + + + +_ + + + + + + + +ref + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + ref +
+
+
+

tag

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + +section + + + + + + + +_ + + + + + + + + + + + +[^{] + + + + + + + + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + +/include + + + + + + + +_ + + + + + + + + + + + +respath + + + + + + + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + description + respath +
+
+
+

servers

+
+ + + + + + + + + + + +_ + + + + + + + +servers + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + +rest_servers + + + + + + + + +_ + + + + + + + + + + + + + + + +event_servers + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + rest_servers + event_servers +
+
+
+

rest_servers

+
+ + + + + + + + + + + +_ + + + + + + + +/REST + + + + + + + +_ + + + + + + + + + + + +server + + + + + + + + + + + + + + +
+
+ Used by: + servers +
+
+ References: + _ + server +
+
+
+

event_servers

+
+ + + + + + + + + + + +_ + + + + + + + +/events + + + + + + + +_ + + + + + + + + + + + +server + + + + + + + + + + + + + + +
+
+ Used by: + servers +
+
+ References: + _ + server +
+
+
+

server

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + +server + + + + + + + +_ + + + + + + + += + + + + + + + +_ + + + + + + + +url + + + + + + + +_ + + + + + + + +environment + + + + + + + +_ + + + + + + + + + + + + + + + +protocol + + + + + + + + +_ + + + + + + + +
+
+ Used by: + rest_servers + event_servers +
+
+ References: + _ + description + url + environment + protocol +
+
+
+

url

+
+ + + + + + + + + + + +" + + + + + + + + + + + +[^"] + + + + + + + + + + + + + + +" + + + + + + + +
+
+ Used by: + server +
+
+ References: +
+
+
+

environment

+
+ + + + + + + + + + + +environment + + + + + + + +_ + + + + + + + += + + + + + + + +_ + + + + + + + +name + + + + + + + +
+
+ Used by: + server +
+
+ References: + _ + name +
+
+
+

protocol

+
+ + + + + + + + + + + +protocol + + + + + + + +_ + + + + + + + += + + + + + + + +_ + + + + + + + +name + + + + + + + +
+
+ Used by: + server +
+
+ References: + _ + name +
+
+
+

enum

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + +enum + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + +literal + + + + + + + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + description + name + literal +
+
+
+

literal

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + +literalname + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + enum +
+
+ References: + _ + description + literalname +
+
+
+

literalname

+
+ + + + + + + + + + + + +[a-zA-Z0-9_:-] + + + + + + + + + + + + + +
+
+ Used by: + literal +
+
+ References: +
+
+
+

ref

+
+ + + + + + + + + + + + + + + + + + + + + + + +filename + + + + + + + +. + + + + + + + + + + +_ + + + + + + + +respath + + + + + + + +_ + + + + + + + +
+
+ Used by: + include + dimport + exclude + fold + produces + consumes + errors + attribute +
+
+ References: + filename + _ + respath +
+
+
+

respath

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +parents + + + + + + + + +_ + + + + + + + +resname + + + + + + + +_ + + + + + + + +
+
+ Used by: + tag + ref +
+
+ References: + _ + parents + resname +
+
+
+

noparentrespath

+
+ + + + + + + + + + + +_ + + + + + + + +resname + + + + + + + +_ + + + + + + + +
+
+ Used by: + resource +
+
+ References: + _ + resname +
+
+
+

parentrespath

+
+ + + + + + + + + + + +_ + + + + + + + +parents + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + +
+
+ Used by: + subresource + action +
+
+ References: + _ + parents + name +
+
+
+

parents

+
+ + + + + + + + + + + +_ + + + + + + + +resname + + + + + + + + + + + + + + + +:: + + + + + + + + + + + + + +name + + + + + + + + + + + +
+
+ Used by: + respath + parentrespath +
+
+ References: + _ + resname + name +
+
+
+

resname

+
+ + + + + + + + + + + + + + + + + + + + + + + +v + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + +/ + + + + + + + + + + + + + + +[a-zA-Z] + + + + + + + + + + + + + + + + + + + + + + + + + + +[a-zA-Z0-9] + + + + + + + + + + + + + + + +
+
+ Used by: + event + respath + noparentrespath + parents + docs + docEntry +
+
+ References: +
+
+
+

name

+
+ + + + + + + + + + + + + + + +[a-zA-Z_] + + + + + + + + + + + + + + + + + + + + + + + + + + +[_a-zA-Z0-9] + + + + + + + + + + + + + + + +
+ +
+ References: +
+
+
+

filename

+
+ + + + + + + + + + + + +[a-zA-Z0-9_-] + + + + + + + + + + + + + +
+
+ Used by: + import + includeAll + ref +
+
+ References: +
+
+
+

description

+
+ + + + + + + + + + + +" + + + + + + + +_ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" + + + + + + + + + + +[any character] + + + + + + + + + + + + + + + + + +" + + + + + + + +
+ +
+ References: + _ +
+
+
+

semver

+
+ + + + + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + +. + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + +. + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + +
+
+ Used by: + namespacedefinition +
+
+ References: +
+
+ +
+

__

+
+ + + + + + + + + + + + + + + + + + + + +[ \t\r\n] + + + + + + + + + + + + + + +comment + + + + + + + + + + + + + + + +
+
+ Used by: + attribute + modifiers + constraints +
+
+ References: + comment +
+
+
+

comment

+
+ + + + + + + + + + + +single + + + + + + + +multi + + + + + + + +
+
+ Used by: + _ + __ + cursorOptions + cursorOption +
+
+ References: + single + multi +
+
+
+

single

+
+ + + + + + + + + + + +// + + + + + + + + + + + + + + + + + + + +[^\n] + + + + + + + + + + + + + + + +
+
+ Used by: + comment +
+
+ References: +
+
+
+

multi

+
+ + + + + + + + + + + +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +*/ + + + + + + + + + + +[any character] + + + + + + + + + + + + + + + + + +*/ + + + + + + + +
+
+ Used by: + comment +
+
+ References: +
+
+
+

docs

+
+ + + + + + + + + + + +_ + + + + + + + +docs + + + + + + + +_ + + + + + + + +resname + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +docEntry + + + + + + + + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + resname + docEntry +
+
+
+

docEntry

+
+ + + + + + + + + + + +_ + + + + + + + +resname + + + + + + + +_ + + + + + + + += + + + + + + + +_ + + + + + + + +description + + + + + + + +_ + + + + + + + +
+
+ Used by: + docs +
+
+ References: + _ + resname + description +
+
+
+

resource

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + + + + + + + + + +future + + + + + + + + +_ + + + + + + + + + + + + + + + +singleton + + + + + + + + +_ + + + + + + + + + + +configuration-resource + + + + + + + +asset-resource + + + + + + + +resource + + + + + + + +request-resource + + + + + + + + +_ + + + + + + + +noparentrespath + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + +attributes + + + + + + + + +_ + + + + + + + + + + + + + + + +operationsEventsAndRequestHeadersSubsections + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+ +
+
+

subresource

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + + + + + + + + + +future + + + + + + + + +_ + + + + + + + + + + + + + + + +singleton + + + + + + + + +_ + + + + + + + +subresource + + + + + + + +_ + + + + + + + +parentrespath + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + +attributes + + + + + + + + +_ + + + + + + + + + + + + + + + +operationsEventsAndRequestHeadersSubsections + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+ +
+
+

action

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + + + + + + + + + +future + + + + + + + + +_ + + + + + + + + + + +sync + + + + + + + +async + + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +bulk + + + + + + + +resource-level + + + + + + + + + + +_ + + + + + + + +action + + + + + + + +_ + + + + + + + +parentrespath + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + +attributes + + + + + + + + +_ + + + + + + + + + + + + + + + +operationsEventsAndRequestHeadersSubsections + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+ +
+
+

operationsEventsAndRequestHeadersSubsections

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + + + + + + + + + +operations + + + + + + + +events + + + + + + + +requestHeaders + + + + + + + + + + + + + + + + + +
+
+ Used by: + resource + subresource + action +
+
+ References: + _ + operations + events + requestHeaders +
+
+
+

operations

+
+ + + + + + + + + + + +_ + + + + + + + +/operations + + + + + + + +_ + + + + + + + + + + + +operation + + + + + + + + + + + + + + +_ + + + + + + + +
+ +
+ References: + _ + operation +
+
+
+

operation

+
+ + + + + + + + + + + +_ + + + + + + + +ops + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +errors + + + + + + + + + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + operations +
+
+ References: + _ + ops + errors +
+
+
+

events

+
+ + + + + + + + + + + +_ + + + + + + + +/events + + + + + + + +_ + + + + + + + + + + + +eventops + + + + + + + + + + + + + + +_ + + + + + + + +
+ +
+ References: + _ + eventops +
+
+
+

requestHeaders

+
+ + + + + + + + + + + +_ + + + + + + + +/request-headers + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +operationOrWildcardAndHeaderDefName + + + + + + + + + + + + + + + +_ + + + + + + + +
+ + +
+
+

operationOrWildcardAndHeaderDefName

+
+ + + + + + + + + + + + + + +oplist + + + + + + + +* + + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + +
+
+ Used by: + requestHeaders +
+
+ References: + oplist + _ + name +
+
+
+

errors

+
+ + + + + + + + + + + +_ + + + + + + + + + + + +errorcode + + + + + + + + + + + + + + +_ + + + + + + + +ref + + + + + + + +_ + + + + + + + +
+
+ Used by: + operation +
+
+ References: + _ + errorcode + ref +
+
+
+

errorcode

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + +
+
+ Used by: + errors +
+
+ References: + _ + description +
+
+
+

ops

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + + + + +mainops + + + + + + + +multiops + + + + + + + + +_ + + + + + + + +options + + + + + + + +_ + + + + + + + +
+
+ Used by: + operation +
+
+ References: + _ + description + mainops + multiops + options +
+
+
+

eventops

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + + + + +mainops + + + + + + + + + + + + + + + +[a-z_] + + + + + + + + + + + + + + + + + + + + + + + + + + +[_a-z0-9] + + + + + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + events +
+
+ References: + _ + description + mainops +
+
+
+

oplist

+
+ + + + + + + + + + + +GET + + + + + + + +MULTIGET + + + + + + + +PUT + + + + + + + +MULTIPUT + + + + + + + +PATCH + + + + + + + +MULTIPATCH + + + + + + + +POST + + + + + + + +MULTIPOST + + + + + + + +DELETE + + + + + + + +MULTIDELETE + + + + + + + +
+ +
+ References: +
+
+
+

mainops

+
+ + + + + + + + + + + +GET + + + + + + + +PUT + + + + + + + +PATCH + + + + + + + +POST + + + + + + + +DELETE + + + + + + + +
+
+ Used by: + ops + eventops +
+
+ References: +
+
+
+

multiops

+
+ + + + + + + + + + + +MULTIGET + + + + + + + +MULTIPUT + + + + + + + +MULTIPATCH + + + + + + + +MULTIPOST + + + + + + + +MULTIDELETE + + + + + + + +
+
+ Used by: + ops +
+
+ References: +
+
+
+

options

+
+ + + + + + + + + + + + + + + + + + + + + + + + +option + + + + + + + +pagination + + + + + + + + + + + + + + + + +
+
+ Used by: + ops +
+
+ References: + option + pagination +
+
+
+

option

+
+ + + + + + + + + + + +_ + + + + + + + + + + + +[a-z_-] + + + + + + + + + + + + + + +_ + + + + + + + += + + + + + + + +_ + + + + + + + + + + + +[a-zA-Z0-9_-] + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + options +
+
+ References: + _ +
+
+
+

ids

+
+ + + + + + + + + + + + +id + + + + + + + + + + + + + +
+
+ Used by: +
+
+ References: + id +
+
+
+

id

+
+ + + + + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + + + + + + + + + +, + + + + + + + + +_ + + + + + + + +
+
+ Used by: + ids +
+
+ References: + _ + name +
+
+
+

pagination

+
+ + + + + + + + + + + +cursorOptions + + + + + + + +deprecated-offset-pagination + + + + + + + +no-pagination + + + + + + + +
+
+ Used by: + options +
+
+ References: + cursorOptions +
+
+
+

cursorOptions

+
+ + + + + + + + + + + +_ + + + + + + + +pagination + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + +cursorOption + + + + + + + +comment + + + + + + + + + + + + + + + + +} + + + + + + + +_ + + + + + + + +
+
+ Used by: + pagination +
+
+ References: + _ + cursorOption + comment +
+
+
+

cursorOption

+
+ + + + + + + + + + + +_ + + + + + + + + + + + +[a-zA-Z_-] + + + + + + + + + + + + + + +_ + + + + + + + += + + + + + + + +_ + + + + + + + + + + +bool + + + + + + + +number + + + + + + + + +_ + + + + + + + + + + + + + + + +comment + + + + + + + + +_ + + + + + + + +
+
+ Used by: + cursorOptions +
+
+ References: + _ + bool + number + comment +
+
+
+

bool

+
+ + + + + + + + + + + +true + + + + + + + +false + + + + + + + +
+
+ Used by: + cursorOption +
+
+ References: +
+
+
+

httpHeader

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + +http-header + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + +name: + + + + + + + +_ + + + + + + + + + + + +[a-zA-Z0-9-] + + + + + + + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + description + name +
+
+
+

structure

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + + + + +structure + + + + + + + +union + + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + +{ + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +attribute + + + + + + + + + + + + + + + +_ + + + + + + + +} + + + + + + + +_ + + + + + + + + + + + + + + + +; + + + + + + + + +_ + + + + + + + +
+
+ Used by: + reslang +
+
+ References: + _ + description + name + attribute +
+
+
+

attributes

+
+ + + + + + + + + + + +_ + + + + + + + + + + + +attribute + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + header + payload + resource + subresource + action +
+
+ References: + _ + attribute +
+
+
+

attribute

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + +description + + + + + + + + +_ + + + + + + + +name + + + + + + + +_ + + + + + + + +: + + + + + + + +_ + + + + + + + + + + + + + + + +stringmap< + + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +linked + + + + + + + +value-of + + + + + + + + + + +_ + + + + + + + +ref + + + + + + + +_ + + + + + + + + + + + + + + + +> + + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +array1 + + + + + + + +array2 + + + + + + + + + + +_ + + + + + + + +modifiers + + + + + + + +_ + + + + + + + +constraints + + + + + + + +_ + + + + + + + + + + + + + + + +inline + + + + + + + + + + + + + + + + +example + + + + + + + + +_ + + + + + + + + + + + + + + + +default + + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +__ + + + + + + + +; + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + structure + attributes +
+
+ References: + _ + description + name + ref + array1 + array2 + modifiers + constraints + example + default + __ +
+
+
+

example

+
+ + + + + + + + + + + +_ + + + + + + + +example: + + + + + + + +_ + + + + + + + +description + + + + + + + +_ + + + + + + + +
+
+ Used by: + attribute +
+
+ References: + _ + description +
+
+
+

default

+
+ + + + + + + + + + + +_ + + + + + + + +default + + + + + + + +_ + + + + + + + += + + + + + + + +_ + + + + + + + + + + +boolean + + + + + + + +string + + + + + + + +numerical + + + + + + + + +_ + + + + + + + +
+
+ Used by: + attribute +
+
+ References: + _ + boolean + string + numerical +
+
+
+

boolean

+
+ + + + + + + + + + + +_ + + + + + + + + + + +true + + + + + + + +false + + + + + + + + +
+
+ Used by: + default +
+
+ References: + _ +
+
+
+

numerical

+
+ + + + + + + + + + + +_ + + + + + + + + + + + + + + + + + + +[+-] + + + + + + + + + + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + + + + + + + + + + + + + + +. + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + + + + + +_ + + + + + + + +
+
+ Used by: + default +
+
+ References: + _ +
+
+
+

string

+
+ + + + + + + + + + + +_ + + + + + + + +" + + + + + + + + + + + +[^"] + + + + + + + + + + + + + + +" + + + + + + + +_ + + + + + + + +
+
+ Used by: + default +
+
+ References: + _ +
+
+
+

array1

+
+ + + + + + + + + + + +[ + + + + + + + + + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + + +_ + + + + + + + +.. + + + + + + + +_ + + + + + + + + + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + + + +] + + + + + + + +
+
+ Used by: + attribute +
+
+ References: + _ +
+
+
+

array2

+
+ + + + + + + + +[] + + + + + + +
+
+ Used by: + attribute +
+
+ References: +
+
+
+

modifiers

+
+ + + + + + + + + + + + + + + + + + + + + + + + +_ + + + + + + + + + + +flag + + + + + + + +mutable + + + + + + + +output + + + + + + + +optional-post + + + + + + + +optional-put + + + + + + + +optional-get + + + + + + + +queryonly + + + + + + + +query + + + + + + + +representation + + + + + + + +optional + + + + + + + + + + + +__ + + + + + + + +; + + + + + + + + + + + + + + + + + +
+
+ Used by: + attribute +
+
+ References: + _ + __ +
+
+
+

constraints

+
+ + + + + + + + + + + + + + + + + + + + + + + + +_ + + + + + + + + + + +maxLength + + + + + + + +minLength + + + + + + + + + + + +__ + + + + + + + +; + + + + + + + + + + + + + + + + + +
+
+ Used by: + attribute +
+
+ References: + _ + maxLength + minLength + __ +
+
+
+

minLength

+
+ + + + + + + + + + + +min-length: + + + + + + + +_ + + + + + + + +number + + + + + + + +
+
+ Used by: + constraints +
+
+ References: + _ + number +
+
+
+

maxLength

+
+ + + + + + + + + + + +max-length: + + + + + + + +_ + + + + + + + +number + + + + + + + +
+
+ Used by: + constraints +
+
+ References: + _ + number +
+
+
+

number

+
+ + + + + + + + + + + + +[0-9] + + + + + + + + + + + + + +
+
+ Used by: + cursorOption + minLength + maxLength +
+
+ References: +
+
+
+ + From 570ca0b8c7417b1195a6e057d1840fa7a9b6c46a Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 17:04:44 -0500 Subject: [PATCH 04/43] update comment --- src/grammar/servers.pegjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grammar/servers.pegjs b/src/grammar/servers.pegjs index 6dfa0fcb..95b5868f 100644 --- a/src/grammar/servers.pegjs +++ b/src/grammar/servers.pegjs @@ -4,7 +4,8 @@ // - there are 2 types of servers - REST and EVENTS // - each server entry starts with a URL, an environment name, and an optional protocol -// - during swagger generation runtime, a default PROD server will be added (see src/library/servers.reslang & LOCAL_SERVERS_INCLUDE in src/genbase.ts) +// - during swagger generation runtime, a default PROD server will be added and used +// (see src/library/servers.reslang & LOCAL_SERVERS_INCLUDE in src/genbase.ts & args.env in src/main.ts) // - variables can be specified in the URL - using the syntax {variable_name[:optional_default]} // - the variables are taken from variables passed in through the command line switch: --var port=8020 From 4fe4beb017c0356410230d5b01dc99c1f9ba8dd1 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 16:55:27 -0500 Subject: [PATCH 05/43] update reference to html version --- docs/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference.md b/docs/reference.md index fa5fbd66..d36aa91f 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -1,6 +1,6 @@ # Reference Manual -The reslang grammar is fully described by these [railroad diagrams](./bnf/railroad-for-reslang.pdf). +The reslang grammar is fully described by these [railroad diagrams](./bnf/railroad-for-reslang.html). Note that we will draw heavily on the example specified [here](../models/direct2dist). This demo namespace models the complete Direct2Dist specification, which allows ids to be sent directly to a destination. This is explained in more detail [here](./direct2dist-explanation.md). From 85fe1fb7a6b365c1d268aaf0d85d8fe9c0ef0267 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Fri, 17 Sep 2021 06:53:56 -0500 Subject: [PATCH 06/43] use pegjs instead for parsing summary --- src/genswagger.ts | 43 ++++++++++++++++++++++++++++++------------ src/grammar/rest.pegjs | 23 ++++++++++++++++++++-- src/treetypes.ts | 1 + 3 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/genswagger.ts b/src/genswagger.ts index 06831cb1..2086aa8d 100644 --- a/src/genswagger.ts +++ b/src/genswagger.ts @@ -384,10 +384,12 @@ export default class SwagGen extends BaseGen { } } this.formErrors(ops.post, responses) + let operationId = this.formOperationId(el, Verbs.POST); path.post = { tags: [tagKeys[unique]], - operationId: this.formOperationId(el, Verbs.POST), + operationId: operationId, description: this.translateDoc(ops.post.comment), + summary: ops.post.summary || operationId, requestBody: { content: { "application/json": { @@ -436,10 +438,12 @@ export default class SwagGen extends BaseGen { } this.formErrors(ops.multipost, responses) + let operationId = this.formOperationId(el, Verbs.MULTIPOST) path.post = { tags: [tagKeys[unique]], - operationId: this.formOperationId(el, Verbs.MULTIPOST), + operationId: operationId, description: this.translateDoc(ops.multipost.comment), + summary: ops.multipost.summary || operationId, requestBody: { content: { "application/json": { @@ -490,10 +494,12 @@ export default class SwagGen extends BaseGen { } this.formErrors(ops.multiput, responses) + let operationId = this.formOperationId(el, Verbs.MULTIPUT); path.put = { tags: [tagKeys[unique]], - operationId: this.formOperationId(el, Verbs.MULTIPUT), + operationId: operationId, description: this.translateDoc(ops.multiput.comment), + summary: ops.multiput.summary || operationId, requestBody: { content: { "application/json": { @@ -543,10 +549,12 @@ export default class SwagGen extends BaseGen { } this.formErrors(ops.multipatch, responses) + let operationId = this.formOperationId(el, Verbs.MULTIPATCH); path.patch = { tags: [tagKeys[unique]], - operationId: this.formOperationId(el, Verbs.MULTIPATCH), + operationId: operationId, description: this.translateDoc(ops.multipatch.comment), + summary: ops.multipatch.summary || operationId, requestBody: { content: { "application/json": { @@ -596,10 +604,12 @@ export default class SwagGen extends BaseGen { } this.formErrors(ops.multidelete, responses) + let operationId = this.formOperationId(el, Verbs.MULTIDELETE); path.delete = { tags: [tagKeys[unique]], - operationId: this.formOperationId(el, Verbs.MULTIDELETE), + operationId: operationId, description: this.translateDoc(ops.multidelete.comment), + summary: ops.multidelete.summary || operationId, requestBody: { content: { "application/json": { @@ -656,7 +666,6 @@ export default class SwagGen extends BaseGen { let ref = `${camel}MultiResponse` let paginationResponseRef = `${camel}MultiResponsePagination` let schema: any = { $ref: `#/components/schemas/${ref}` } - let description = plural + " retrieved successfully" let headers = paginator.strategy() === strategy.Offset ? (paginator as Offset).xTotalCountHeader() @@ -677,7 +686,7 @@ export default class SwagGen extends BaseGen { let responses: any = { 200: { - description, + description: `${plural} retrieved successfully`, headers, content: this.jsonContentSchema(schema) } @@ -689,10 +698,12 @@ export default class SwagGen extends BaseGen { this.formErrors(ops.multiget, responses) const rname = this.formSingleUniqueName(el) + let operationId = this.formOperationId(el, Verbs.MULTIGET); path.get = { tags: [tagKeys[rname]], - operationId: this.formOperationId(el, Verbs.MULTIGET), + operationId: operationId, description: this.translateDoc(ops.multiget.comment), + summary: ops.multiget.summary || operationId, responses } if (gparams.length) { @@ -810,10 +821,12 @@ export default class SwagGen extends BaseGen { } this.formErrors(ops.get, responses) const rname = this.formSingleUniqueName(el) + let operationId = this.formOperationId(el, Verbs.GET); path.get = { tags: [tagKeys[rname]], - operationId: this.formOperationId(el, Verbs.GET), + operationId: operationId, description: this.translateDoc(ops.get.comment), + summary: ops.get.summary || operationId, responses } if (!singleton) { @@ -852,10 +865,12 @@ export default class SwagGen extends BaseGen { } this.formErrors(ops.put, responses) const rname = this.formSingleUniqueName(el) + let operationId = this.formOperationId(el, Verbs.PUT); path.put = { tags: [tagKeys[rname]], - operationId: this.formOperationId(el, Verbs.PUT), + operationId: operationId, description: this.translateDoc(ops.put.comment), + summary: ops.put.summary || operationId, requestBody: { content: { "application/json": { @@ -895,10 +910,12 @@ export default class SwagGen extends BaseGen { } this.formErrors(ops.patch, responses) const rname = this.formSingleUniqueName(el) + let operationId = this.formOperationId(el, Verbs.PATCH); path.patch = { tags: [tagKeys[rname]], - operationId: this.formOperationId(el, Verbs.PATCH), + operationId: operationId, description: this.translateDoc(ops.patch.comment), + summary: ops.patch.summary || operationId, requestBody: { content: { "application/json": { @@ -938,10 +955,12 @@ export default class SwagGen extends BaseGen { } this.formErrors(ops.delete, responses) const rname = this.formSingleUniqueName(el) + let operationId = this.formOperationId(el, Verbs.DELETE); path.delete = { tags: [tagKeys[rname]], - operationId: this.formOperationId(el, Verbs.DELETE), + operationId: operationId, description: this.translateDoc(ops.delete.comment), + summary: ops.delete.summary || operationId, responses } if (!singleton) { diff --git a/src/grammar/rest.pegjs b/src/grammar/rest.pegjs index 0322d532..36956b55 100644 --- a/src/grammar/rest.pegjs +++ b/src/grammar/rest.pegjs @@ -104,11 +104,30 @@ errorcode = _ comment:description? _ code:[0-9]+ { return {"code": code.join(""), "comment": comment} } +operation_description = "\"" _ summary:operation_summary? _ inner:(!"\"" i:. {return i} )* "\"" { + var description = inner.join("").replace(/\\n/g, "\n") + if (!summary) { + summary = "" + } + return { + "description": description, + "summary": summary + } +} + +operation_summary = "Summary:" _ content:(!"\n" !"\"" i:. {return i})* "\n" "\s"* { + return content.join("") +} + ops = - _ comment:description? _ op:(mainops / multiops) _ allOptions: options _ { + _ comment:operation_description? _ op:(mainops / multiops) _ allOptions: options _ { + if (!comment) { + comment = {} + } return { operation: op, - comment: comment, + comment: comment.description, + summary: comment.summary, options: allOptions.standard, pagination: allOptions.pagination } diff --git a/src/treetypes.ts b/src/treetypes.ts index e153b4b4..fab5a708 100644 --- a/src/treetypes.ts +++ b/src/treetypes.ts @@ -277,6 +277,7 @@ export interface IOperation { options: IOption[] pagination?: { strategy: string; options: [] } comment: string + summary: string errors: IError[] } From 97326a80f191833936dc7a76be780954e2a9af70 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 20 Sep 2021 11:25:41 -0500 Subject: [PATCH 07/43] bump reslang version --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 81205f4d..f6d613fe 100755 --- a/src/main.ts +++ b/src/main.ts @@ -18,7 +18,7 @@ import JsonSchemaGen from "./genjsonschema" const RULES = "rules.json" const LOCAL_RULES = lpath.join(__dirname, "library", RULES) -export const VERSION = "v6.1.1" +export const VERSION = "v6.1.2" // parse the cmd line const args = yargs From 779161087a31ce7d843ca72bbaf5259e97c7b6c5 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 23 Sep 2021 12:07:35 -0500 Subject: [PATCH 08/43] update tests for pagination reword --- .../authorization/testdata/swagger.expected | 33 ++++---- .../testdata/swagger.expected | 22 +++--- models/direct2dist/testdata/swagger.expected | 11 ++- models/distribution/testdata/swagger.expected | 77 +++++++++---------- models/file/testdata/swagger.expected | 44 +++++------ models/milkman/testdata/swagger.expected | 33 ++++---- models/multi/testdata/swagger.expected | 11 ++- models/pagination/testdata/swagger.expected | 29 ++++--- models/request/testdata/swagger.expected | 11 ++- .../simple-resource/testdata/swagger.expected | 22 +++--- models/stringmaps/testdata/swagger.expected | 11 ++- models/table/testdata/swagger.expected | 22 +++--- 12 files changed, 148 insertions(+), 178 deletions(-) diff --git a/models/authorization/testdata/swagger.expected b/models/authorization/testdata/swagger.expected index b2f4659e..7e10afe9 100644 --- a/models/authorization/testdata/swagger.expected +++ b/models/authorization/testdata/swagger.expected @@ -79,8 +79,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -256,8 +256,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -348,8 +348,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -559,13 +559,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. OrganizationMultiResponsePagination: type: object properties: @@ -574,13 +573,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. RoleMultiResponsePagination: type: object properties: @@ -589,11 +587,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/complex-resource/testdata/swagger.expected b/models/complex-resource/testdata/swagger.expected index 6f8acc4f..35d631bc 100644 --- a/models/complex-resource/testdata/swagger.expected +++ b/models/complex-resource/testdata/swagger.expected @@ -60,8 +60,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -193,8 +193,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -471,13 +471,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. CarWheelMultiResponsePagination: type: object properties: @@ -486,11 +485,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/direct2dist/testdata/swagger.expected b/models/direct2dist/testdata/swagger.expected index ccb102ce..d2752fd5 100644 --- a/models/direct2dist/testdata/swagger.expected +++ b/models/direct2dist/testdata/swagger.expected @@ -76,8 +76,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -645,11 +645,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/distribution/testdata/swagger.expected b/models/distribution/testdata/swagger.expected index 9f0f6667..b40473c5 100644 --- a/models/distribution/testdata/swagger.expected +++ b/models/distribution/testdata/swagger.expected @@ -78,8 +78,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -190,8 +190,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -337,8 +337,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -483,8 +483,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -629,8 +629,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -742,8 +742,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -855,8 +855,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -1346,13 +1346,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. DestinationTaxonomyConfigurationMultiResponsePagination: type: object properties: @@ -1361,13 +1360,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. DestinationIntegrationMultiResponsePagination: type: object properties: @@ -1376,13 +1374,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. DestinationEndpointMultiResponsePagination: type: object properties: @@ -1391,13 +1388,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. DestinationPackagerMultiResponsePagination: type: object properties: @@ -1406,13 +1402,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. DestinationFormatterMultiResponsePagination: type: object properties: @@ -1421,13 +1416,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. DestinationDelivererMultiResponsePagination: type: object properties: @@ -1436,11 +1430,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/file/testdata/swagger.expected b/models/file/testdata/swagger.expected index e414dbb9..aa62699c 100644 --- a/models/file/testdata/swagger.expected +++ b/models/file/testdata/swagger.expected @@ -67,8 +67,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -158,8 +158,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -282,8 +282,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -374,8 +374,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -701,13 +701,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. FileTypeMultiResponsePagination: type: object properties: @@ -716,13 +715,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. DirectoryFileMultiResponsePagination: type: object properties: @@ -731,13 +729,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. DirectoryDeleteRequestMultiResponsePagination: type: object properties: @@ -746,11 +743,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/milkman/testdata/swagger.expected b/models/milkman/testdata/swagger.expected index feaf8b9e..35a1d32b 100644 --- a/models/milkman/testdata/swagger.expected +++ b/models/milkman/testdata/swagger.expected @@ -63,8 +63,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -125,8 +125,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -162,8 +162,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -348,13 +348,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. BulksearchDeliverMilkMultiResponsePagination: type: object properties: @@ -363,13 +362,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. BulksearchMilkMultiResponsePagination: type: object properties: @@ -378,11 +376,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/multi/testdata/swagger.expected b/models/multi/testdata/swagger.expected index 5e011c50..8a5b321d 100644 --- a/models/multi/testdata/swagger.expected +++ b/models/multi/testdata/swagger.expected @@ -140,8 +140,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -352,11 +352,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/pagination/testdata/swagger.expected b/models/pagination/testdata/swagger.expected index f381d9d7..1d5012e3 100644 --- a/models/pagination/testdata/swagger.expected +++ b/models/pagination/testdata/swagger.expected @@ -94,8 +94,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -126,15 +126,15 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string - in: query name: before description: >- - This value is a cursor that enables backward-paginated searches. Its + This value is a cursor that enables backward-paginated queries. Its value can be found under "_pagination.before" in the previous response from this endpoint. schema: @@ -237,13 +237,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. BellsAndWhistlesMultiResponsePagination: type: object properties: @@ -252,24 +251,22 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. before: type: string nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. It allows the next request to query the previous page of results. - When "before" is null, there are no previous records to fetch for - this search. + When "before" is null, there are no previous records to fetch. total: type: integer nullable: false diff --git a/models/request/testdata/swagger.expected b/models/request/testdata/swagger.expected index 30966b04..5a36e027 100644 --- a/models/request/testdata/swagger.expected +++ b/models/request/testdata/swagger.expected @@ -74,8 +74,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -881,11 +881,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/simple-resource/testdata/swagger.expected b/models/simple-resource/testdata/swagger.expected index ceb717a0..8886fbaf 100644 --- a/models/simple-resource/testdata/swagger.expected +++ b/models/simple-resource/testdata/swagger.expected @@ -69,8 +69,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -227,8 +227,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -410,13 +410,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. BarMultiResponsePagination: type: object properties: @@ -425,11 +424,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/stringmaps/testdata/swagger.expected b/models/stringmaps/testdata/swagger.expected index b26bf31d..4a52f0ef 100644 --- a/models/stringmaps/testdata/swagger.expected +++ b/models/stringmaps/testdata/swagger.expected @@ -58,8 +58,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -313,11 +313,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. diff --git a/models/table/testdata/swagger.expected b/models/table/testdata/swagger.expected index ed2697b1..29c783c2 100644 --- a/models/table/testdata/swagger.expected +++ b/models/table/testdata/swagger.expected @@ -103,8 +103,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -313,8 +313,8 @@ paths: - in: query name: after description: >- - This value is a cursor that enables continued paginated searches. - Its value can be found under "_pagination.after" in the previous + This value is a cursor that enables continued paginated queries. Its + value can be found under "_pagination.after" in the previous response from this endpoint. schema: type: string @@ -541,13 +541,12 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. TableMultiResponsePagination: type: object properties: @@ -556,11 +555,10 @@ components: nullable: true description: >- This field is a cursor to be passed as a query parameter in - subsequent, paginated searches. + subsequent, paginated queries. - It allows the next request to begin from where the current search + It allows the next request to begin from where the current request left off. - When "after" is null, there are no more records to fetch for this - search. + When "after" is null, there are no more records to fetch. From 433d164175bc9c73df5d078cb850b516ffb04a02 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 23 Sep 2021 12:26:53 -0500 Subject: [PATCH 09/43] add summary to swagger test cases --- .../authorization/testdata/swagger.expected | 11 +++++++++ models/checkrules/testdata/swagger.expected | 10 ++++++++ .../testdata/swagger.expected | 7 ++++++ models/direct2dist/testdata/swagger.expected | 5 ++++ models/distribution/testdata/swagger.expected | 24 +++++++++++++++++++ models/eventing/testdata/swagger.expected | 7 ++++++ models/file/testdata/swagger.expected | 13 ++++++++++ .../project_A/testdata/swagger.expected | 1 + models/linked/testdata/swagger.expected | 3 +++ models/milkman/testdata/swagger.expected | 6 +++++ models/multi/testdata/swagger.expected | 9 +++++++ models/multiplicity/testdata/swagger.expected | 1 + models/namespaces/testdata/swagger.expected | 12 ++++++++++ models/optionality/testdata/swagger.expected | 4 ++++ models/pagination/testdata/swagger.expected | 4 ++++ models/patchable/testdata/swagger.expected | 4 ++++ models/request/testdata/swagger.expected | 17 +++++++++++++ models/servers/testdata/swagger.expected | 2 ++ .../simple-resource/testdata/swagger.expected | 9 +++++++ models/singleton/testdata/swagger.expected | 10 ++++++++ models/stringmaps/testdata/swagger.expected | 4 ++++ models/table/testdata/swagger.expected | 10 ++++++++ models/upversion/testdata/swagger.expected | 8 +++++++ 23 files changed, 181 insertions(+) diff --git a/models/authorization/testdata/swagger.expected b/models/authorization/testdata/swagger.expected index 7e10afe9..61fa7231 100644 --- a/models/authorization/testdata/swagger.expected +++ b/models/authorization/testdata/swagger.expected @@ -24,6 +24,7 @@ paths: - User operationId: Create User description: '' + summary: Create User requestBody: content: application/json: @@ -58,6 +59,7 @@ paths: - User operationId: Get Users description: '' + summary: Get Users responses: '200': description: Users retrieved successfully @@ -108,6 +110,7 @@ paths: - User operationId: Get User description: '' + summary: Get User responses: '200': description: User retrieved successfully @@ -140,6 +143,7 @@ paths: - Suspend User operationId: Suspend User description: '' + summary: Suspend User responses: '200': description: Suspend action completed @@ -171,6 +175,7 @@ paths: - Unsuspend User operationId: Unsuspend User description: '' + summary: Unsuspend User responses: '200': description: Unsuspend action completed @@ -214,6 +219,7 @@ paths: - Organization operationId: Create Organization description: '' + summary: Create Organization requestBody: content: application/json: @@ -235,6 +241,7 @@ paths: - Organization operationId: Get Organizations description: '' + summary: Get Organizations responses: '200': description: Organizations retrieved successfully @@ -267,6 +274,7 @@ paths: - Organization operationId: Get Organization description: '' + summary: Get Organization responses: '200': description: Organization retrieved successfully @@ -293,6 +301,7 @@ paths: - Role operationId: Create Role description: '' + summary: Create Role requestBody: content: application/json: @@ -327,6 +336,7 @@ paths: - Role operationId: Get Roles description: '' + summary: Get Roles responses: '200': description: Roles retrieved successfully @@ -365,6 +375,7 @@ paths: - Role operationId: Get Role description: '' + summary: Get Role responses: '200': description: Role retrieved successfully diff --git a/models/checkrules/testdata/swagger.expected b/models/checkrules/testdata/swagger.expected index 2631e717..9634aff2 100644 --- a/models/checkrules/testdata/swagger.expected +++ b/models/checkrules/testdata/swagger.expected @@ -28,6 +28,7 @@ paths: - A operationId: Create A description: '' + summary: Create A requestBody: content: application/json: @@ -50,6 +51,7 @@ paths: - A operationId: Get A description: '' + summary: Get A responses: '200': description: A retrieved successfully @@ -76,6 +78,7 @@ paths: - 'A::B' operationId: 'Create A::B' description: '' + summary: 'Create A::B' requestBody: content: application/json: @@ -112,6 +115,7 @@ paths: - 'A::B' operationId: 'Get A::B' description: '' + summary: 'Get A::B' responses: '200': description: B retrieved successfully @@ -145,6 +149,7 @@ paths: - 'A::B::C' operationId: 'Create A::B::C' description: '' + summary: 'Create A::B::C' requestBody: content: application/json: @@ -188,6 +193,7 @@ paths: - 'A::B::C' operationId: 'Get A::B::C' description: '' + summary: 'Get A::B::C' responses: '200': description: C retrieved successfully @@ -228,6 +234,7 @@ paths: - 'Start A::B::C' operationId: 'start A::B::C' description: '' + summary: 'start A::B::C' requestBody: content: application/json: @@ -278,6 +285,7 @@ paths: - 'Start A::B::C' operationId: 'Get A::B::C::start' description: '' + summary: 'Get A::B::C::start' responses: '200': description: start retrieved successfully @@ -325,6 +333,7 @@ paths: - 'Stop A::B' operationId: 'stop A::B asynchronously' description: '' + summary: 'stop A::B asynchronously' requestBody: content: application/json: @@ -388,6 +397,7 @@ paths: - 'Stop A::B' operationId: 'Get A::B::stop' description: '' + summary: 'Get A::B::stop' responses: '200': description: stop retrieved successfully diff --git a/models/complex-resource/testdata/swagger.expected b/models/complex-resource/testdata/swagger.expected index 35d631bc..1b7a1a48 100644 --- a/models/complex-resource/testdata/swagger.expected +++ b/models/complex-resource/testdata/swagger.expected @@ -18,6 +18,7 @@ paths: - Car operationId: Create Car description: '' + summary: Create Car requestBody: content: application/json: @@ -39,6 +40,7 @@ paths: - Car operationId: Get Cars description: '' + summary: Get Cars responses: '200': description: Cars retrieved successfully @@ -91,6 +93,7 @@ paths: - Car operationId: Get Car description: '' + summary: Get Car responses: '200': description: Car retrieved successfully @@ -124,6 +127,7 @@ paths: - 'Car::Wheel' operationId: 'Create Car::Wheel' description: '' + summary: 'Create Car::Wheel' requestBody: content: application/json: @@ -159,6 +163,7 @@ paths: - 'Car::Wheel' operationId: 'Get Car::Wheels' description: '' + summary: 'Get Car::Wheels' responses: '200': description: Wheels retrieved successfully @@ -210,6 +215,7 @@ paths: - 'Car::Wheel' operationId: 'Get Car::Wheel' description: '' + summary: 'Get Car::Wheel' responses: '200': description: Wheel retrieved successfully @@ -242,6 +248,7 @@ paths: - 'Car::Wheel' operationId: 'Modify Car::Wheel' description: '' + summary: 'Modify Car::Wheel' responses: '200': description: Wheel modified successfully diff --git a/models/direct2dist/testdata/swagger.expected b/models/direct2dist/testdata/swagger.expected index d2752fd5..51ad4662 100644 --- a/models/direct2dist/testdata/swagger.expected +++ b/models/direct2dist/testdata/swagger.expected @@ -30,6 +30,7 @@ paths: - DistributionRequest operationId: Create DistributionRequest description: Use this endpoint to create a new DistributionRequest + summary: Create DistributionRequest requestBody: content: application/json: @@ -55,6 +56,7 @@ paths: default. Response of this method includes a header “X-Total-Count” to indicate the total number of records. Use this value along with query parameters, offset and limit, to iterate through the entire result set + summary: Get DistributionRequests responses: '200': description: DistributionRequests retrieved successfully @@ -182,6 +184,7 @@ paths: including current status, input configuration as well as output metadata, if the request has completed + summary: Get DistributionRequest responses: '200': description: DistributionRequest retrieved successfully @@ -207,6 +210,7 @@ paths: - Cancel DistributionRequest operationId: Cancel DistributionRequest asynchronously description: '' + summary: Cancel DistributionRequest asynchronously responses: '200': description: Cancel action completed @@ -257,6 +261,7 @@ paths: - Retry DistributionRequest operationId: Retry DistributionRequest asynchronously description: '' + summary: Retry DistributionRequest asynchronously responses: '200': description: Retry action completed diff --git a/models/distribution/testdata/swagger.expected b/models/distribution/testdata/swagger.expected index b40473c5..f37852a3 100644 --- a/models/distribution/testdata/swagger.expected +++ b/models/distribution/testdata/swagger.expected @@ -36,6 +36,7 @@ paths: - Destination operationId: Create Destination description: Create a new destination + summary: Create Destination requestBody: content: application/json: @@ -57,6 +58,7 @@ paths: - Destination operationId: Get Destinations description: Get all destinations + summary: Get Destinations responses: '200': description: Destinations retrieved successfully @@ -94,6 +96,7 @@ paths: - Destination operationId: Get Destination description: Retrieve a current destination + summary: Get Destination responses: '200': description: Destination retrieved successfully @@ -120,6 +123,7 @@ paths: - 'Destination::TaxonomyConfiguration' operationId: 'Create Destination::TaxonomyConfiguration' description: '' + summary: 'Create Destination::TaxonomyConfiguration' requestBody: content: application/json: @@ -155,6 +159,7 @@ paths: - 'Destination::TaxonomyConfiguration' operationId: 'Get Destination::TaxonomyConfigurations' description: '' + summary: 'Get Destination::TaxonomyConfigurations' responses: '200': description: TaxonomyConfigurations retrieved successfully @@ -207,6 +212,7 @@ paths: - 'Destination::TaxonomyConfiguration' operationId: 'Get Destination::TaxonomyConfiguration' description: '' + summary: 'Get Destination::TaxonomyConfiguration' responses: '200': description: TaxonomyConfiguration retrieved successfully @@ -239,6 +245,7 @@ paths: - 'Destination::TaxonomyConfiguration' operationId: 'Modify Destination::TaxonomyConfiguration' description: '' + summary: 'Modify Destination::TaxonomyConfiguration' responses: '200': description: TaxonomyConfiguration modified successfully @@ -268,6 +275,7 @@ paths: - 'Destination::Integration' operationId: 'Create Destination::Integration' description: Create an integration + summary: 'Create Destination::Integration' requestBody: content: application/json: @@ -303,6 +311,7 @@ paths: - 'Destination::Integration' operationId: 'Get Destination::Integrations' description: Retrieve many integrations + summary: 'Get Destination::Integrations' responses: '200': description: Integrations retrieved successfully @@ -353,6 +362,7 @@ paths: - 'Destination::Integration' operationId: 'Get Destination::Integration' description: Retrieve an integration + summary: 'Get Destination::Integration' responses: '200': description: Integration retrieved successfully @@ -385,6 +395,7 @@ paths: - 'Destination::Integration' operationId: 'Modify Destination::Integration' description: Alter an integration + summary: 'Modify Destination::Integration' responses: '200': description: Integration modified successfully @@ -414,6 +425,7 @@ paths: - 'Destination::Endpoint' operationId: 'Create Destination::Endpoint' description: '' + summary: 'Create Destination::Endpoint' requestBody: content: application/json: @@ -449,6 +461,7 @@ paths: - 'Destination::Endpoint' operationId: 'Get Destination::Endpoints' description: '' + summary: 'Get Destination::Endpoints' responses: '200': description: Endpoints retrieved successfully @@ -499,6 +512,7 @@ paths: - 'Destination::Endpoint' operationId: 'Get Destination::Endpoint' description: '' + summary: 'Get Destination::Endpoint' responses: '200': description: Endpoint retrieved successfully @@ -531,6 +545,7 @@ paths: - 'Destination::Endpoint' operationId: 'Modify Destination::Endpoint' description: '' + summary: 'Modify Destination::Endpoint' responses: '200': description: Endpoint modified successfully @@ -560,6 +575,7 @@ paths: - 'Destination::Packager' operationId: 'Create Destination::Packager' description: '' + summary: 'Create Destination::Packager' requestBody: content: application/json: @@ -595,6 +611,7 @@ paths: - 'Destination::Packager' operationId: 'Get Destination::Packagers' description: '' + summary: 'Get Destination::Packagers' responses: '200': description: Packagers retrieved successfully @@ -640,6 +657,7 @@ paths: - 'Destination::Packager' operationId: 'Get Destination::Packager' description: '' + summary: 'Get Destination::Packager' responses: '200': description: Packager retrieved successfully @@ -673,6 +691,7 @@ paths: - 'Destination::Formatter' operationId: 'Create Destination::Formatter' description: '' + summary: 'Create Destination::Formatter' requestBody: content: application/json: @@ -708,6 +727,7 @@ paths: - 'Destination::Formatter' operationId: 'Get Destination::Formatters' description: '' + summary: 'Get Destination::Formatters' responses: '200': description: Formatters retrieved successfully @@ -753,6 +773,7 @@ paths: - 'Destination::Formatter' operationId: 'Get Destination::Formatter' description: '' + summary: 'Get Destination::Formatter' responses: '200': description: Formatter retrieved successfully @@ -786,6 +807,7 @@ paths: - 'Destination::Deliverer' operationId: 'Create Destination::Deliverer' description: '' + summary: 'Create Destination::Deliverer' requestBody: content: application/json: @@ -821,6 +843,7 @@ paths: - 'Destination::Deliverer' operationId: 'Get Destination::Deliverers' description: '' + summary: 'Get Destination::Deliverers' responses: '200': description: Deliverers retrieved successfully @@ -866,6 +889,7 @@ paths: - 'Destination::Deliverer' operationId: 'Get Destination::Deliverer' description: '' + summary: 'Get Destination::Deliverer' responses: '200': description: Deliverer retrieved successfully diff --git a/models/eventing/testdata/swagger.expected b/models/eventing/testdata/swagger.expected index 19c2713e..f2db46a1 100644 --- a/models/eventing/testdata/swagger.expected +++ b/models/eventing/testdata/swagger.expected @@ -22,6 +22,7 @@ paths: - SimpleResource operationId: Create SimpleResource description: '' + summary: Create SimpleResource requestBody: content: application/json: @@ -43,6 +44,7 @@ paths: - SimpleResource operationId: Get SimpleResource description: '' + summary: Get SimpleResource responses: '200': description: SimpleResource retrieved successfully @@ -68,6 +70,7 @@ paths: - v2/TestResource operationId: Create v2/TestResource description: '' + summary: Create v2/TestResource requestBody: content: application/json: @@ -90,6 +93,7 @@ paths: - v2/TestResource operationId: Get v2/TestResource description: '' + summary: Get v2/TestResource responses: '200': description: v2/TestResource retrieved successfully @@ -116,6 +120,7 @@ paths: - 'v2/TestResource::Foo' operationId: 'Create v2/TestResource::Foo' description: '' + summary: 'Create v2/TestResource::Foo' requestBody: content: application/json: @@ -152,6 +157,7 @@ paths: - 'v2/TestResource::Foo2' operationId: 'Create v2/TestResource::Foo2' description: '' + summary: 'Create v2/TestResource::Foo2' requestBody: content: application/json: @@ -188,6 +194,7 @@ paths: - 'v2/TestResource::Foo2' operationId: 'Get v2/TestResource::Foo2' description: '' + summary: 'Get v2/TestResource::Foo2' responses: '200': description: Foo2 retrieved successfully diff --git a/models/file/testdata/swagger.expected b/models/file/testdata/swagger.expected index aa62699c..73d56b0e 100644 --- a/models/file/testdata/swagger.expected +++ b/models/file/testdata/swagger.expected @@ -24,6 +24,7 @@ paths: - Directories and other musings operationId: Create Directory description: '' + summary: Create Directory requestBody: content: application/json: @@ -46,6 +47,7 @@ paths: - Directories and other musings operationId: Get Directories description: '' + summary: Get Directories responses: '200': description: Directories retrieved successfully @@ -90,6 +92,7 @@ paths: - Directories and other musings operationId: Get Directory description: '' + summary: Get Directory responses: '200': description: Directory retrieved successfully @@ -117,6 +120,7 @@ paths: - Files and other arrangements operationId: Create FileType description: '' + summary: Create FileType requestBody: content: application/json: @@ -137,6 +141,7 @@ paths: - Files and other arrangements operationId: Get FileTypes description: '' + summary: Get FileTypes responses: '200': description: FileTypes retrieved successfully @@ -174,6 +179,7 @@ paths: - Files and other arrangements operationId: Get FileType description: Get a FileType + summary: Get FileType responses: '200': description: FileType retrieved successfully @@ -211,6 +217,7 @@ paths: - 'Directory::File' operationId: 'Create Directory::File' description: '' + summary: 'Create Directory::File' requestBody: content: application/json: @@ -247,6 +254,7 @@ paths: - 'Directory::File' operationId: 'Get Directory::Files' description: '' + summary: 'Get Directory::Files' responses: '200': description: Files retrieved successfully @@ -298,6 +306,7 @@ paths: - 'Directory::File' operationId: 'Get Directory::File' description: '' + summary: 'Get Directory::File' responses: '200': description: File retrieved successfully @@ -332,6 +341,7 @@ paths: - Directories and other musings operationId: Create DirectoryDeleteRequest description: '' + summary: Create DirectoryDeleteRequest requestBody: content: application/json: @@ -353,6 +363,7 @@ paths: - Directories and other musings operationId: Get DirectoryDeleteRequests description: '' + summary: Get DirectoryDeleteRequests responses: '200': description: DirectoryDeleteRequests retrieved successfully @@ -391,6 +402,7 @@ paths: - Directories and other musings operationId: Get DirectoryDeleteRequest description: '' + summary: Get DirectoryDeleteRequest responses: '200': description: DirectoryDeleteRequest retrieved successfully @@ -417,6 +429,7 @@ paths: - Files and other arrangements operationId: Cancel DirectoryDeleteRequest description: '' + summary: Cancel DirectoryDeleteRequest requestBody: content: application/json: diff --git a/models/imported-subresources/project_A/testdata/swagger.expected b/models/imported-subresources/project_A/testdata/swagger.expected index d66452fb..653497e7 100644 --- a/models/imported-subresources/project_A/testdata/swagger.expected +++ b/models/imported-subresources/project_A/testdata/swagger.expected @@ -16,6 +16,7 @@ openapi: 3.0.1 - ReeSource operationId: Get ReeSource description: '' + summary: Get ReeSource responses: '200': description: ReeSource retrieved successfully diff --git a/models/linked/testdata/swagger.expected b/models/linked/testdata/swagger.expected index f2aa4ace..663eba67 100644 --- a/models/linked/testdata/swagger.expected +++ b/models/linked/testdata/swagger.expected @@ -20,6 +20,7 @@ paths: - Foo operationId: Get Foo description: '' + summary: Get Foo responses: '200': description: Foo retrieved successfully @@ -45,6 +46,7 @@ paths: - 'Foo::Bar' operationId: 'Get Foo::Bar' description: '' + summary: 'Get Foo::Bar' responses: '200': description: Bar retrieved successfully @@ -76,6 +78,7 @@ paths: - Linking operationId: Get Linking description: '' + summary: Get Linking responses: '200': description: Linking retrieved successfully diff --git a/models/milkman/testdata/swagger.expected b/models/milkman/testdata/swagger.expected index 35a1d32b..4dee2448 100644 --- a/models/milkman/testdata/swagger.expected +++ b/models/milkman/testdata/swagger.expected @@ -22,6 +22,7 @@ paths: - DeliverMilk operationId: Create DeliverMilk description: '' + summary: Create DeliverMilk requestBody: content: application/json: @@ -42,6 +43,7 @@ paths: - DeliverMilk operationId: Get DeliverMilks description: '' + summary: Get DeliverMilks responses: '200': description: DeliverMilks retrieved successfully @@ -79,6 +81,7 @@ paths: - DeliverMilk operationId: Get DeliverMilk description: '' + summary: Get DeliverMilk responses: '200': description: DeliverMilk retrieved successfully @@ -104,6 +107,7 @@ paths: - Bulk search DeliverMilk operationId: 'Get Bulk DeliverMilk::searches' description: '' + summary: 'Get Bulk DeliverMilk::searches' responses: '200': description: searches retrieved successfully @@ -141,6 +145,7 @@ paths: - Bulk search Milk operationId: 'Get Bulk Milk::searches' description: '' + summary: 'Get Bulk Milk::searches' responses: '200': description: searches retrieved successfully @@ -178,6 +183,7 @@ paths: - AllDeliveredMilk operationId: Get AllDeliveredMilk description: '' + summary: Get AllDeliveredMilk responses: '200': description: AllDeliveredMilk retrieved successfully diff --git a/models/multi/testdata/swagger.expected b/models/multi/testdata/swagger.expected index 8a5b321d..06a77d09 100644 --- a/models/multi/testdata/swagger.expected +++ b/models/multi/testdata/swagger.expected @@ -16,6 +16,7 @@ paths: - Aaa operationId: Create Aaas description: '' + summary: Create Aaas requestBody: content: application/json: @@ -43,6 +44,7 @@ paths: - Aaa operationId: Modify Aaas description: '' + summary: Modify Aaas requestBody: content: application/json: @@ -67,6 +69,7 @@ paths: - Aaa operationId: Patch Aaas description: '' + summary: Patch Aaas requestBody: content: application/json: @@ -91,6 +94,7 @@ paths: - Aaa operationId: Delete Aaas description: '' + summary: Delete Aaas requestBody: content: application/json: @@ -119,6 +123,7 @@ paths: - Aaa operationId: Get Aaas description: '' + summary: Get Aaas responses: '200': description: Aaas retrieved successfully @@ -151,6 +156,7 @@ paths: - Aaa operationId: Get Aaa description: '' + summary: Get Aaa responses: '200': description: Aaa retrieved successfully @@ -176,6 +182,7 @@ paths: - Aaa operationId: Modify Aaa description: '' + summary: Modify Aaa requestBody: content: application/json: @@ -202,6 +209,7 @@ paths: - Aaa operationId: Patch Aaa description: '' + summary: Patch Aaa requestBody: content: application/json: @@ -228,6 +236,7 @@ paths: - Aaa operationId: Delete Aaa description: '' + summary: Delete Aaa responses: '200': description: Aaa deleted successfully diff --git a/models/multiplicity/testdata/swagger.expected b/models/multiplicity/testdata/swagger.expected index 97971407..f5be98c4 100644 --- a/models/multiplicity/testdata/swagger.expected +++ b/models/multiplicity/testdata/swagger.expected @@ -16,6 +16,7 @@ paths: - MTest operationId: Create MTest description: '' + summary: Create MTest requestBody: content: application/json: diff --git a/models/namespaces/testdata/swagger.expected b/models/namespaces/testdata/swagger.expected index 82bdd751..162e4f91 100644 --- a/models/namespaces/testdata/swagger.expected +++ b/models/namespaces/testdata/swagger.expected @@ -22,6 +22,7 @@ paths: - A operationId: Create A description: '' + summary: Create A responses: '201': description: A created successfully @@ -38,6 +39,7 @@ paths: - A operationId: Get A description: '' + summary: Get A responses: '200': description: A retrieved successfully @@ -62,6 +64,7 @@ paths: - A operationId: Modify A description: '' + summary: Modify A responses: '200': description: A modified successfully @@ -83,6 +86,7 @@ paths: - 'A::Suba' operationId: 'Create A::Suba' description: '' + summary: 'Create A::Suba' responses: '201': description: Suba created successfully @@ -112,6 +116,7 @@ paths: - 'A::Suba' operationId: 'Get A::Suba' description: '' + summary: 'Get A::Suba' responses: '200': description: Suba retrieved successfully @@ -142,6 +147,7 @@ paths: - 'A::Suba' operationId: 'Modify A::Suba' description: '' + summary: 'Modify A::Suba' responses: '200': description: Suba modified successfully @@ -169,6 +175,7 @@ paths: - B operationId: Create B description: '' + summary: Create B responses: '201': description: B created successfully @@ -185,6 +192,7 @@ paths: - B operationId: Get B description: '' + summary: Get B responses: '200': description: B retrieved successfully @@ -209,6 +217,7 @@ paths: - B operationId: Modify B description: '' + summary: Modify B responses: '200': description: B modified successfully @@ -230,6 +239,7 @@ paths: - 'B::Subb' operationId: 'Create B::Subb' description: '' + summary: 'Create B::Subb' responses: '201': description: Subb created successfully @@ -259,6 +269,7 @@ paths: - 'B::Subb' operationId: 'Get B::Subb' description: '' + summary: 'Get B::Subb' responses: '200': description: Subb retrieved successfully @@ -289,6 +300,7 @@ paths: - 'B::Subb' operationId: 'Modify B::Subb' description: '' + summary: 'Modify B::Subb' responses: '200': description: Subb modified successfully diff --git a/models/optionality/testdata/swagger.expected b/models/optionality/testdata/swagger.expected index 2168d750..3a73558f 100644 --- a/models/optionality/testdata/swagger.expected +++ b/models/optionality/testdata/swagger.expected @@ -16,6 +16,7 @@ paths: - Car operationId: Create Car description: Create a car + summary: Create Car requestBody: content: application/json: @@ -37,6 +38,7 @@ paths: - Car operationId: Get Car description: Get a single car + summary: Get Car responses: '200': description: Car retrieved successfully @@ -61,6 +63,7 @@ paths: - Car operationId: Modify Car description: Update a car + summary: Modify Car requestBody: content: application/json: @@ -86,6 +89,7 @@ paths: - Car operationId: Patch Car description: Patch a car + summary: Patch Car requestBody: content: application/json: diff --git a/models/pagination/testdata/swagger.expected b/models/pagination/testdata/swagger.expected index 1d5012e3..01f1d5e6 100644 --- a/models/pagination/testdata/swagger.expected +++ b/models/pagination/testdata/swagger.expected @@ -22,6 +22,7 @@ paths: - Unpaginated operationId: Get Unpaginateds description: '' + summary: Get Unpaginateds responses: '200': description: Unpaginateds retrieved successfully @@ -36,6 +37,7 @@ paths: - Legacy operationId: Get Legacies description: '' + summary: Get Legacies responses: '200': description: Legacies retrieved successfully @@ -73,6 +75,7 @@ paths: - ImplicitCursor operationId: Get ImplicitCursors description: '' + summary: Get ImplicitCursors responses: '200': description: ImplicitCursors retrieved successfully @@ -105,6 +108,7 @@ paths: - BellsAndWhistles operationId: Get multiple BellsAndWhistles description: '' + summary: Get multiple BellsAndWhistles responses: '200': description: BellsAndWhistles retrieved successfully diff --git a/models/patchable/testdata/swagger.expected b/models/patchable/testdata/swagger.expected index 4ff0f94f..a5d2203f 100644 --- a/models/patchable/testdata/swagger.expected +++ b/models/patchable/testdata/swagger.expected @@ -16,6 +16,7 @@ paths: - Person operationId: Create Person description: '' + summary: Create Person requestBody: content: application/json: @@ -38,6 +39,7 @@ paths: - Person operationId: Get Person description: '' + summary: Get Person responses: '200': description: Person retrieved successfully @@ -63,6 +65,7 @@ paths: - Person operationId: Modify Person description: '' + summary: Modify Person requestBody: content: application/json: @@ -89,6 +92,7 @@ paths: - Person operationId: Patch Person description: '' + summary: Patch Person requestBody: content: application/json: diff --git a/models/request/testdata/swagger.expected b/models/request/testdata/swagger.expected index 5a36e027..b12b35a2 100644 --- a/models/request/testdata/swagger.expected +++ b/models/request/testdata/swagger.expected @@ -32,6 +32,7 @@ paths: - UploadRequest operationId: Create UploadRequest description: '' + summary: Create UploadRequest requestBody: content: application/json: @@ -53,6 +54,7 @@ paths: - UploadRequest operationId: Get UploadRequests description: '' + summary: Get UploadRequests responses: '200': description: UploadRequests retrieved successfully @@ -90,6 +92,7 @@ paths: - UploadRequest operationId: Get UploadRequest description: '' + summary: Get UploadRequest responses: '200': description: UploadRequest retrieved successfully @@ -116,6 +119,7 @@ paths: - 'UploadRequest::Status' operationId: 'Get UploadRequest::Status' description: '' + summary: 'Get UploadRequest::Status' responses: '200': description: Status retrieved successfully @@ -143,6 +147,7 @@ paths: - 'UploadRequest::RecordSet' operationId: 'Create UploadRequest::RecordSet' description: '' + summary: 'Create UploadRequest::RecordSet' requestBody: content: application/json: @@ -179,6 +184,7 @@ paths: - 'UploadRequest::RecordSet' operationId: 'Get UploadRequest::RecordSet' description: '' + summary: 'Get UploadRequest::RecordSet' responses: '200': description: RecordSet retrieved successfully @@ -212,6 +218,7 @@ paths: - 'UploadRequest::RecordSet::Deep' operationId: 'Create UploadRequest::RecordSet::Deep' description: '' + summary: 'Create UploadRequest::RecordSet::Deep' requestBody: content: application/json: @@ -255,6 +262,7 @@ paths: - 'UploadRequest::RecordSet::Deep' operationId: 'Get UploadRequest::RecordSet::Deep' description: '' + summary: 'Get UploadRequest::RecordSet::Deep' responses: '200': description: Deep retrieved successfully @@ -295,6 +303,7 @@ paths: - StartProcessingAction UploadRequest operationId: StartProcessingAction UploadRequest asynchronously description: '' + summary: StartProcessingAction UploadRequest asynchronously requestBody: content: application/json: @@ -353,6 +362,7 @@ paths: - StopProcessingAction UploadRequest operationId: StopProcessingAction UploadRequest description: '' + summary: StopProcessingAction UploadRequest requestBody: content: application/json: @@ -389,6 +399,7 @@ paths: - StopProcessingAction UploadRequest operationId: 'Get UploadRequest::StopProcessingAction' description: '' + summary: 'Get UploadRequest::StopProcessingAction' responses: '200': description: StopProcessingAction retrieved successfully @@ -422,6 +433,7 @@ paths: - Bulk StartProcessingAction UploadRequest operationId: Bulk StartProcessingAction UploadRequest description: '' + summary: Bulk StartProcessingAction UploadRequest requestBody: content: application/json: @@ -444,6 +456,7 @@ paths: - Bulk StartProcessingAction UploadRequest operationId: 'Get Bulk UploadRequest::StartProcessingAction' description: '' + summary: 'Get Bulk UploadRequest::StartProcessingAction' responses: '200': description: StartProcessingAction retrieved successfully @@ -471,6 +484,7 @@ paths: - 'Bulk Clear UploadRequest::RecordSet' operationId: 'Bulk Clear UploadRequest::RecordSet' description: '' + summary: 'Bulk Clear UploadRequest::RecordSet' requestBody: content: application/json: @@ -507,6 +521,7 @@ paths: - 'Bulk Clear UploadRequest::RecordSet' operationId: 'Get Bulk UploadRequest::RecordSet::Clear' description: '' + summary: 'Get Bulk UploadRequest::RecordSet::Clear' responses: '200': description: Clear retrieved successfully @@ -540,6 +555,7 @@ paths: - 'Bulk Jump UploadRequest::RecordSet::Deep' operationId: 'Bulk Jump UploadRequest::RecordSet::Deep' description: '' + summary: 'Bulk Jump UploadRequest::RecordSet::Deep' requestBody: content: application/json: @@ -583,6 +599,7 @@ paths: - 'Bulk Jump UploadRequest::RecordSet::Deep' operationId: 'Get Bulk UploadRequest::RecordSet::Deep::Jump' description: '' + summary: 'Get Bulk UploadRequest::RecordSet::Deep::Jump' responses: '200': description: Jump retrieved successfully diff --git a/models/servers/testdata/swagger.expected b/models/servers/testdata/swagger.expected index a16c0528..c21f2ead 100644 --- a/models/servers/testdata/swagger.expected +++ b/models/servers/testdata/swagger.expected @@ -16,6 +16,7 @@ paths: - Test operationId: Create Test description: '' + summary: Create Test requestBody: content: application/json: @@ -38,6 +39,7 @@ paths: - Test operationId: Get Test description: '' + summary: Get Test responses: '200': description: Test retrieved successfully diff --git a/models/simple-resource/testdata/swagger.expected b/models/simple-resource/testdata/swagger.expected index 8886fbaf..3d3d0119 100644 --- a/models/simple-resource/testdata/swagger.expected +++ b/models/simple-resource/testdata/swagger.expected @@ -26,6 +26,7 @@ paths: - Garage operationId: Create Garage description: Actual POST comment + summary: Create Garage requestBody: content: application/json: @@ -48,6 +49,7 @@ paths: - Garage operationId: Get Garages description: '' + summary: Get Garages responses: '200': description: Garages retrieved successfully @@ -92,6 +94,7 @@ paths: - Garage operationId: Get Garage description: '' + summary: Get Garage responses: '200': description: Garage retrieved successfully @@ -118,6 +121,7 @@ paths: - Garage operationId: Modify Garage description: Actual PUT comment + summary: Modify Garage requestBody: content: application/json: @@ -145,6 +149,7 @@ paths: - Garage operationId: Delete Garage description: '' + summary: Delete Garage responses: '200': description: Garage deleted successfully @@ -168,6 +173,7 @@ paths: - Foo operationId: Get Foo description: '' + summary: Get Foo responses: '200': description: Foo retrieved successfully @@ -186,6 +192,7 @@ paths: - Foo operationId: Modify Foo description: '' + summary: Modify Foo requestBody: content: application/json: @@ -206,6 +213,7 @@ paths: - Bar operationId: Get Bars description: '' + summary: Get Bars responses: '200': description: Bars retrieved successfully @@ -243,6 +251,7 @@ paths: - Test operationId: Create Test description: '' + summary: Create Test requestBody: content: application/json: diff --git a/models/singleton/testdata/swagger.expected b/models/singleton/testdata/swagger.expected index ab691056..3a85ffb6 100644 --- a/models/singleton/testdata/swagger.expected +++ b/models/singleton/testdata/swagger.expected @@ -24,6 +24,7 @@ paths: - Resource operationId: Create Resource description: '' + summary: Create Resource requestBody: content: application/json: @@ -46,6 +47,7 @@ paths: - Resource operationId: Get Resource description: '' + summary: Get Resource responses: '200': description: Resource retrieved successfully @@ -72,6 +74,7 @@ paths: - 'Resource::Metadata' operationId: 'Get Resource::Metadata' description: '' + summary: 'Get Resource::Metadata' responses: '200': description: Metadata retrieved successfully @@ -98,6 +101,7 @@ paths: - 'Resource::Metadata' operationId: 'Modify Resource::Metadata' description: '' + summary: 'Modify Resource::Metadata' responses: '200': description: Metadata modified successfully @@ -121,6 +125,7 @@ paths: - SingletonResource operationId: Get SingletonResource description: '' + summary: Get SingletonResource responses: '200': description: SingletonResource retrieved successfully @@ -139,6 +144,7 @@ paths: - SingletonResource operationId: Modify SingletonResource description: '' + summary: Modify SingletonResource responses: '200': description: SingletonResource modified successfully @@ -154,6 +160,7 @@ paths: - 'SingletonResource::PostableSingletonSub' operationId: 'Create SingletonResource::PostableSingletonSub' description: '' + summary: 'Create SingletonResource::PostableSingletonSub' requestBody: content: application/json: @@ -173,6 +180,7 @@ paths: - 'SingletonResource::PostableSingletonSub' operationId: 'Get SingletonResource::PostableSingletonSub' description: '' + summary: 'Get SingletonResource::PostableSingletonSub' responses: '200': description: PostableSingletonSub retrieved successfully @@ -192,6 +200,7 @@ paths: - 'SingletonResource::PostableSingletonSub' operationId: 'Modify SingletonResource::PostableSingletonSub' description: '' + summary: 'Modify SingletonResource::PostableSingletonSub' responses: '200': description: PostableSingletonSub modified successfully @@ -207,6 +216,7 @@ paths: - PostableSingletonResource operationId: Create PostableSingletonResource description: '' + summary: Create PostableSingletonResource requestBody: content: application/json: diff --git a/models/stringmaps/testdata/swagger.expected b/models/stringmaps/testdata/swagger.expected index 4a52f0ef..d322d35a 100644 --- a/models/stringmaps/testdata/swagger.expected +++ b/models/stringmaps/testdata/swagger.expected @@ -16,6 +16,7 @@ paths: - SMap operationId: Create SMap description: '' + summary: Create SMap requestBody: content: application/json: @@ -37,6 +38,7 @@ paths: - SMap operationId: Get SMaps description: '' + summary: Get SMaps responses: '200': description: SMaps retrieved successfully @@ -75,6 +77,7 @@ paths: - SMap operationId: Get SMap description: '' + summary: Get SMap responses: '200': description: SMap retrieved successfully @@ -100,6 +103,7 @@ paths: - SMap operationId: Modify SMap description: '' + summary: Modify SMap requestBody: content: application/json: diff --git a/models/table/testdata/swagger.expected b/models/table/testdata/swagger.expected index 29c783c2..341fb1a0 100644 --- a/models/table/testdata/swagger.expected +++ b/models/table/testdata/swagger.expected @@ -22,6 +22,7 @@ paths: - 'Table::Column' operationId: 'Create Table::Column' description: Create a new column in the provided parent table. + summary: 'Create Table::Column' requestBody: content: application/json: @@ -70,6 +71,7 @@ paths: - 'Table::Column' operationId: 'Get Table::Columns' description: Find existing column in the provided parent table + summary: 'Get Table::Columns' responses: '200': description: Columns retrieved successfully @@ -114,6 +116,7 @@ paths: - 'Table::Column' operationId: 'Get Table::Column' description: Find a single existing column in the provided parent table + summary: 'Get Table::Column' responses: '200': description: Column retrieved successfully @@ -152,6 +155,7 @@ paths: The list of values passed in will be added to the column's existing set of values. + summary: 'Modify Table::Column' requestBody: content: application/json: @@ -195,6 +199,7 @@ paths: be processed in the table and will no longer have stats calculated for it + summary: 'Disable Table::Column' responses: '200': description: Disable action completed @@ -237,6 +242,7 @@ paths: be processed in the table and will no longer have stats calculated for them + summary: 'Bulk Disable Table::Column' requestBody: content: application/json: @@ -272,6 +278,7 @@ paths: - Table operationId: Create Table description: '' + summary: Create Table requestBody: content: application/json: @@ -292,6 +299,7 @@ paths: - Table operationId: Get Tables description: '' + summary: Get Tables responses: '200': description: Tables retrieved successfully @@ -324,6 +332,7 @@ paths: - Table operationId: Get Table description: '' + summary: Get Table responses: '200': description: Table retrieved successfully @@ -348,6 +357,7 @@ paths: - Table operationId: Delete Table description: '' + summary: Delete Table responses: '200': description: Table deleted successfully diff --git a/models/upversion/testdata/swagger.expected b/models/upversion/testdata/swagger.expected index 6cfb206c..4a4cb8a0 100644 --- a/models/upversion/testdata/swagger.expected +++ b/models/upversion/testdata/swagger.expected @@ -22,6 +22,7 @@ paths: - ResourceA operationId: Get ResourceA description: '' + summary: Get ResourceA responses: '200': description: ResourceA retrieved successfully @@ -48,6 +49,7 @@ paths: - ResourceB operationId: Create ResourceB description: '' + summary: Create ResourceB requestBody: content: application/json: @@ -70,6 +72,7 @@ paths: - ResourceB operationId: Get ResourceB description: '' + summary: Get ResourceB responses: '200': description: ResourceB retrieved successfully @@ -95,6 +98,7 @@ paths: - ResourceB operationId: Modify ResourceB description: '' + summary: Modify ResourceB responses: '200': description: ResourceB modified successfully @@ -117,6 +121,7 @@ paths: - v2/ResourceB operationId: Create v2/ResourceB description: '' + summary: Create v2/ResourceB requestBody: content: application/json: @@ -139,6 +144,7 @@ paths: - v2/ResourceB operationId: Get v2/ResourceB description: '' + summary: Get v2/ResourceB responses: '200': description: v2/ResourceB retrieved successfully @@ -165,6 +171,7 @@ paths: - 'v2/ResourceB::Sub' operationId: 'Create v2/ResourceB::Sub' description: '' + summary: 'Create v2/ResourceB::Sub' requestBody: content: application/json: @@ -201,6 +208,7 @@ paths: - 'v2/ResourceB::Sub' operationId: 'Get v2/ResourceB::Sub' description: '' + summary: 'Get v2/ResourceB::Sub' responses: '200': description: Sub retrieved successfully From 5443517f4295a020621af5bdb9ec56faa7ffff2c Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 23 Sep 2021 13:25:58 -0500 Subject: [PATCH 10/43] include summary in parser test cases --- models/authorization/testdata/parsed.expected | 33 +- models/checkrules/testdata/parsed.expected | 30 +- .../complex-resource/testdata/parsed.expected | 48 +- models/direct2dist/testdata/parsed.expected | 15 +- models/distribution/testdata/parsed.expected | 72 +- models/eventing/testdata/parsed.expected | 60 +- models/file/testdata/parsed.expected | 39 +- .../project_A/testdata/parsed.expected | 1025 +++++++++-------- models/linked/testdata/parsed.expected | 9 +- models/milkman/testdata/parsed.expected | 18 +- models/multi/testdata/parsed.expected | 27 +- models/multiplicity/testdata/parsed.expected | 3 +- models/namespaces/testdata/parsed.expected | 36 +- models/optionality/testdata/parsed.expected | 12 +- models/pagination/testdata/parsed.expected | 12 +- models/patchable/testdata/parsed.expected | 12 +- models/request/testdata/parsed.expected | 51 +- models/servers/testdata/parsed.expected | 6 +- .../simple-resource/testdata/parsed.expected | 27 +- models/singleton/testdata/parsed.expected | 30 +- models/stringmaps/testdata/parsed.expected | 12 +- models/table/testdata/parsed.expected | 30 +- models/upversion/testdata/parsed.expected | 24 +- src/tests/parser.test.ts | 10 +- 24 files changed, 919 insertions(+), 722 deletions(-) diff --git a/models/authorization/testdata/parsed.expected b/models/authorization/testdata/parsed.expected index 5ec2ee6d..e8efc83b 100644 --- a/models/authorization/testdata/parsed.expected +++ b/models/authorization/testdata/parsed.expected @@ -173,17 +173,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "requestHeaders": [ @@ -245,7 +248,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -298,7 +302,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "requestHeaders": [ @@ -414,17 +419,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -529,17 +537,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "requestHeaders": [ diff --git a/models/checkrules/testdata/parsed.expected b/models/checkrules/testdata/parsed.expected index a23f8dd2..7c18ce2d 100644 --- a/models/checkrules/testdata/parsed.expected +++ b/models/checkrules/testdata/parsed.expected @@ -166,12 +166,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -249,12 +251,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -333,12 +337,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -420,12 +426,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -507,12 +515,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ diff --git a/models/complex-resource/testdata/parsed.expected b/models/complex-resource/testdata/parsed.expected index 613d204c..954e30dc 100644 --- a/models/complex-resource/testdata/parsed.expected +++ b/models/complex-resource/testdata/parsed.expected @@ -288,17 +288,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -462,22 +465,26 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -656,28 +663,33 @@ "operation": "PUT", "comment": "Actual PUT comment", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "comment": "Actual POST comment", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "DELETE", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -944,12 +956,14 @@ { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -1091,7 +1105,8 @@ { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -1142,7 +1157,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/direct2dist/testdata/parsed.expected b/models/direct2dist/testdata/parsed.expected index d8337e7a..d1ef6943 100644 --- a/models/direct2dist/testdata/parsed.expected +++ b/models/direct2dist/testdata/parsed.expected @@ -542,19 +542,22 @@ "operation": "GET", "comment": "Get a request. See docs: DistMVP.GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "comment": "Use this endpoint to create a new DistributionRequest", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "comment": "Use this endpoint to find existing DistributionRequests. See docs: DistMVP.MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -607,7 +610,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -661,7 +665,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ diff --git a/models/distribution/testdata/parsed.expected b/models/distribution/testdata/parsed.expected index 854d0898..eb290041 100644 --- a/models/distribution/testdata/parsed.expected +++ b/models/distribution/testdata/parsed.expected @@ -89,19 +89,22 @@ "operation": "POST", "comment": "Create a new destination", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "comment": "Retrieve a current destination", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "comment": "Get all destinations", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -206,22 +209,26 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -361,25 +368,29 @@ "operation": "POST", "comment": "Create an integration", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "comment": "Alter an integration", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "comment": "Retrieve an integration", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "comment": "Retrieve many integrations", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -767,22 +778,26 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -983,17 +998,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -1072,17 +1090,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -1188,17 +1209,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ diff --git a/models/eventing/testdata/parsed.expected b/models/eventing/testdata/parsed.expected index dad7b665..9df84845 100644 --- a/models/eventing/testdata/parsed.expected +++ b/models/eventing/testdata/parsed.expected @@ -119,12 +119,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "events": [ @@ -238,12 +240,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "events": [ @@ -336,7 +340,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "events": [ @@ -423,12 +428,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -954,17 +961,20 @@ { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -1218,17 +1228,20 @@ "parentName": "" } } - ] + ], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -1432,17 +1445,20 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "events": [ @@ -1546,17 +1562,20 @@ "parentName": "" } } - ] + ], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "events": [ @@ -1775,7 +1794,8 @@ "parentName": "file.DirectoryDeleteRequest" } } - ] + ], + "summary": "" } ], "parents": [ diff --git a/models/file/testdata/parsed.expected b/models/file/testdata/parsed.expected index 5b1e4c22..549c5260 100644 --- a/models/file/testdata/parsed.expected +++ b/models/file/testdata/parsed.expected @@ -178,17 +178,20 @@ { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -442,17 +445,20 @@ "parentName": "" } } - ] + ], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -656,17 +662,20 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "events": [ @@ -770,17 +779,20 @@ "parentName": "" } } - ] + ], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "events": [ @@ -999,7 +1011,8 @@ "parentName": "DirectoryDeleteRequest" } } - ] + ], + "summary": "" } ], "parents": [ diff --git a/models/imported-subresources/project_A/testdata/parsed.expected b/models/imported-subresources/project_A/testdata/parsed.expected index c1708dcb..4438b616 100644 --- a/models/imported-subresources/project_A/testdata/parsed.expected +++ b/models/imported-subresources/project_A/testdata/parsed.expected @@ -1,524 +1,525 @@ [ - { - "namespace": [ - { - "category": "namespace", - "space": "projectA", - "title": "project A", - "version": "0.0.1" - } - ], - "imports": [ - { - "category": "import", - "import": "project_B" - } + { + "namespace": [ + { + "category": "namespace", + "space": "projectA", + "title": "project A", + "version": "0.0.1" + } + ], + "imports": [ + { + "category": "import", + "import": "project_B" + } + ], + "servers": [], + "tags": [], + "definitions": [ + { + "category": "definition", + "kind": "resource-like", + "future": false, + "singleton": false, + "type": "resource", + "attributes": [ + { + "name": "id", + "stringMap": false, + "type": { + "parents": [], + "short": "string", + "name": "string", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + }, + { + "name": "referenceB", + "stringMap": false, + "type": { + "module": "project_B", + "parents": [ + "Top" + ], + "short": "Sub", + "name": "project_B.Top::Sub", + "parentShort": "Top", + "parentName": "Top" + }, + "inline": false, + "linked": true, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + } ], - "servers": [], - "tags": [], - "definitions": [ - { - "category": "definition", - "kind": "resource-like", - "future": false, - "singleton": false, - "type": "resource", - "attributes": [ - { - "name": "id", - "stringMap": false, - "type": { - "parents": [], - "short": "string", - "name": "string", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - }, - { - "name": "referenceB", - "stringMap": false, - "type": { - "module": "project_B", - "parents": [ - "Top" - ], - "short": "Sub", - "name": "project_B.Top::Sub", - "parentShort": "Top", - "parentName": "Top" - }, - "inline": false, - "linked": true, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - } - ], - "operations": [ - { - "operation": "GET", - "options": [], - "errors": [] - } - ], - "parents": [], - "short": "ReeSource", - "name": "ReeSource", - "parentShort": "", - "parentName": "", - "namespace": "", - "secondary": false, - "file": "api.reslang" - } + "operations": [ + { + "operation": "GET", + "options": [], + "errors": [], + "summary": "" + } ], - "diagrams": [ - { - "category": "diagram", - "diagram": "main", - "include": [ - { - "module": "api", - "parents": [], - "short": "reslang", - "name": "api.reslang", - "parentShort": "", - "parentName": "" - } - ], - "groups": [] - } + "parents": [], + "short": "ReeSource", + "name": "ReeSource", + "parentShort": "", + "parentName": "", + "namespace": "", + "secondary": false, + "file": "api.reslang" + } + ], + "diagrams": [ + { + "category": "diagram", + "diagram": "main", + "include": [ + { + "module": "api", + "parents": [], + "short": "reslang", + "name": "api.reslang", + "parentShort": "", + "parentName": "" + } ], - "docs": [] - }, - { - "namespace": [ - { - "category": "namespace", - "space": "projectB", - "title": "project B", - "version": "0.0.1" - } + "groups": [] + } + ], + "docs": [] + }, + { + "namespace": [ + { + "category": "namespace", + "space": "projectB", + "title": "project B", + "version": "0.0.1" + } + ], + "imports": [], + "servers": [], + "tags": [], + "definitions": [ + { + "category": "definition", + "kind": "resource-like", + "future": false, + "singleton": false, + "type": "resource", + "attributes": [ + { + "name": "id", + "stringMap": false, + "type": { + "parents": [], + "short": "string", + "name": "string", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + } ], - "imports": [], - "servers": [], - "tags": [], - "definitions": [ - { - "category": "definition", - "kind": "resource-like", - "future": false, - "singleton": false, - "type": "resource", - "attributes": [ - { - "name": "id", - "stringMap": false, - "type": { - "parents": [], - "short": "string", - "name": "string", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - } - ], - "parents": [], - "short": "Top", - "name": "project_B.Top", - "parentShort": "", - "parentName": "", - "namespace": "", - "secondary": true, - "file": "api.reslang" + "parents": [], + "short": "Top", + "name": "project_B.Top", + "parentShort": "", + "parentName": "", + "namespace": "", + "secondary": true, + "file": "api.reslang" + }, + { + "category": "definition", + "kind": "resource-like", + "future": false, + "singleton": false, + "type": "subresource", + "attributes": [ + { + "name": "id", + "stringMap": false, + "type": { + "parents": [], + "short": "string", + "name": "string", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + }, + { + "name": "isCool", + "stringMap": false, + "type": { + "parents": [], + "short": "boolean", + "name": "boolean", + "parentShort": "", + "parentName": "" }, - { - "category": "definition", - "kind": "resource-like", - "future": false, - "singleton": false, - "type": "subresource", - "attributes": [ - { - "name": "id", - "stringMap": false, - "type": { - "parents": [], - "short": "string", - "name": "string", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - }, - { - "name": "isCool", - "stringMap": false, - "type": { - "parents": [], - "short": "boolean", - "name": "boolean", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - } - ], - "parents": [ - "Top" - ], - "short": "Sub", - "name": "project_B.Top::Sub", - "parentShort": "Top", - "parentName": "project_B.Top", - "secondary": true, - "file": "api.reslang" - } + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + } ], - "diagrams": [], - "docs": [] - }, - { - "namespace": [], - "imports": [], - "servers": [], - "tags": [], - "definitions": [ - { - "category": "definition", - "kind": "structure", - "type": "structure", - "parents": [], - "short": "StandardError", - "attributes": [ - { - "name": "httpStatus", - "comment": "HTTP error status code for this problem", - "stringMap": false, - "type": { - "parents": [], - "short": "int", - "name": "int", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - }, - { - "name": "errorCode", - "comment": "Service specific error code, more granular", - "stringMap": false, - "type": { - "parents": [], - "short": "string", - "name": "string", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - }, - { - "name": "message", - "comment": "General, human readable error message", - "stringMap": false, - "type": { - "parents": [], - "short": "string", - "name": "string", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - } - ], - "name": "project_B.StandardError", - "parentShort": "", - "parentName": "", - "secondary": true, - "file": "local.reslang" - } + "parents": [ + "Top" ], - "diagrams": [], - "docs": [] - }, - { - "namespace": [], - "imports": [], - "servers": [ - { - "category": "servers", - "rest": [ - { - "url": "https://api.liveramp.com", - "environment": "PROD" - } - ], - "events": [ - { - "comment": "Production Google Pubsub server", - "url": "https://pubsub.googleapis.com/v1/projects/liveramp-events-prod", - "environment": "PROD", - "protocol": "GOOGLE_PUBSUB" - } - ] - } + "short": "Sub", + "name": "project_B.Top::Sub", + "parentShort": "Top", + "parentName": "project_B.Top", + "secondary": true, + "file": "api.reslang" + } + ], + "diagrams": [], + "docs": [] + }, + { + "namespace": [], + "imports": [], + "servers": [], + "tags": [], + "definitions": [ + { + "category": "definition", + "kind": "structure", + "type": "structure", + "parents": [], + "short": "StandardError", + "attributes": [ + { + "name": "httpStatus", + "comment": "HTTP error status code for this problem", + "stringMap": false, + "type": { + "parents": [], + "short": "int", + "name": "int", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + }, + { + "name": "errorCode", + "comment": "Service specific error code, more granular", + "stringMap": false, + "type": { + "parents": [], + "short": "string", + "name": "string", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + }, + { + "name": "message", + "comment": "General, human readable error message", + "stringMap": false, + "type": { + "parents": [], + "short": "string", + "name": "string", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + } + ], + "name": "project_B.StandardError", + "parentShort": "", + "parentName": "", + "secondary": true, + "file": "local.reslang" + } + ], + "diagrams": [], + "docs": [] + }, + { + "namespace": [], + "imports": [], + "servers": [ + { + "category": "servers", + "rest": [ + { + "url": "https://api.liveramp.com", + "environment": "PROD" + } ], - "tags": [], - "definitions": [], - "diagrams": [], - "docs": [] - }, - { - "namespace": [], - "imports": [], - "servers": [], - "tags": [], - "definitions": [ - { - "category": "definition", - "kind": "structure", - "type": "structure", - "parents": [], - "short": "StandardError", - "attributes": [ - { - "name": "httpStatus", - "comment": "HTTP error status code for this problem", - "stringMap": false, - "type": { - "parents": [], - "short": "int", - "name": "int", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - }, - { - "name": "errorCode", - "comment": "Service specific error code, more granular", - "stringMap": false, - "type": { - "parents": [], - "short": "string", - "name": "string", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - }, - { - "name": "message", - "comment": "General, human readable error message", - "stringMap": false, - "type": { - "parents": [], - "short": "string", - "name": "string", - "parentShort": "", - "parentName": "" - }, - "inline": false, - "linked": false, - "full": false, - "modifiers": { - "flag": false, - "mutable": false, - "optional": false, - "optionalPost": false, - "optionalPut": false, - "optionalGet": false, - "output": false, - "queryonly": false, - "query": false, - "representation": false - }, - "constraints": {} - } - ], - "name": "StandardError", - "parentShort": "", - "parentName": "", - "secondary": false, - "file": "local.reslang" - } + "events": [ + { + "comment": "Production Google Pubsub server", + "url": "https://pubsub.googleapis.com/v1/projects/liveramp-events-prod", + "environment": "PROD", + "protocol": "GOOGLE_PUBSUB" + } + ] + } + ], + "tags": [], + "definitions": [], + "diagrams": [], + "docs": [] + }, + { + "namespace": [], + "imports": [], + "servers": [], + "tags": [], + "definitions": [ + { + "category": "definition", + "kind": "structure", + "type": "structure", + "parents": [], + "short": "StandardError", + "attributes": [ + { + "name": "httpStatus", + "comment": "HTTP error status code for this problem", + "stringMap": false, + "type": { + "parents": [], + "short": "int", + "name": "int", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + }, + { + "name": "errorCode", + "comment": "Service specific error code, more granular", + "stringMap": false, + "type": { + "parents": [], + "short": "string", + "name": "string", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + }, + { + "name": "message", + "comment": "General, human readable error message", + "stringMap": false, + "type": { + "parents": [], + "short": "string", + "name": "string", + "parentShort": "", + "parentName": "" + }, + "inline": false, + "linked": false, + "full": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalPost": false, + "optionalPut": false, + "optionalGet": false, + "output": false, + "queryonly": false, + "query": false, + "representation": false + }, + "constraints": {} + } ], - "diagrams": [], - "docs": [] - }, - { - "namespace": [], - "imports": [], - "servers": [ - { - "category": "servers", - "rest": [ - { - "url": "https://api.liveramp.com", - "environment": "PROD" - } - ], - "events": [ - { - "comment": "Production Google Pubsub server", - "url": "https://pubsub.googleapis.com/v1/projects/liveramp-events-prod", - "environment": "PROD", - "protocol": "GOOGLE_PUBSUB" - } - ] - } + "name": "StandardError", + "parentShort": "", + "parentName": "", + "secondary": false, + "file": "local.reslang" + } + ], + "diagrams": [], + "docs": [] + }, + { + "namespace": [], + "imports": [], + "servers": [ + { + "category": "servers", + "rest": [ + { + "url": "https://api.liveramp.com", + "environment": "PROD" + } ], - "tags": [], - "definitions": [], - "diagrams": [], - "docs": [] - } + "events": [ + { + "comment": "Production Google Pubsub server", + "url": "https://pubsub.googleapis.com/v1/projects/liveramp-events-prod", + "environment": "PROD", + "protocol": "GOOGLE_PUBSUB" + } + ] + } + ], + "tags": [], + "definitions": [], + "diagrams": [], + "docs": [] + } ] diff --git a/models/linked/testdata/parsed.expected b/models/linked/testdata/parsed.expected index ede81da4..82694f31 100644 --- a/models/linked/testdata/parsed.expected +++ b/models/linked/testdata/parsed.expected @@ -85,7 +85,8 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -136,7 +137,8 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -364,7 +366,8 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/milkman/testdata/parsed.expected b/models/milkman/testdata/parsed.expected index 4ae37906..f3eaccba 100644 --- a/models/milkman/testdata/parsed.expected +++ b/models/milkman/testdata/parsed.expected @@ -174,17 +174,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "events": [ @@ -271,7 +274,8 @@ { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -352,7 +356,8 @@ { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -408,7 +413,8 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/multi/testdata/parsed.expected b/models/multi/testdata/parsed.expected index 0b4f8200..22e9ffe7 100644 --- a/models/multi/testdata/parsed.expected +++ b/models/multi/testdata/parsed.expected @@ -142,47 +142,56 @@ { "operation": "MULTIPOST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIPUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PATCH", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIPATCH", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "DELETE", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIDELETE", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/multiplicity/testdata/parsed.expected b/models/multiplicity/testdata/parsed.expected index 9d89ecb7..fc165138 100644 --- a/models/multiplicity/testdata/parsed.expected +++ b/models/multiplicity/testdata/parsed.expected @@ -209,7 +209,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/namespaces/testdata/parsed.expected b/models/namespaces/testdata/parsed.expected index 6f2a6159..575affe2 100644 --- a/models/namespaces/testdata/parsed.expected +++ b/models/namespaces/testdata/parsed.expected @@ -44,17 +44,20 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -105,17 +108,20 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -226,17 +232,20 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -287,17 +296,20 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ diff --git a/models/optionality/testdata/parsed.expected b/models/optionality/testdata/parsed.expected index bc52f664..a40d3706 100644 --- a/models/optionality/testdata/parsed.expected +++ b/models/optionality/testdata/parsed.expected @@ -195,25 +195,29 @@ "operation": "GET", "comment": "Get a single car", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "comment": "Create a car", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "comment": "Update a car", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PATCH", "comment": "Patch a car", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/pagination/testdata/parsed.expected b/models/pagination/testdata/parsed.expected index 48cc9a49..2f446e5d 100644 --- a/models/pagination/testdata/parsed.expected +++ b/models/pagination/testdata/parsed.expected @@ -54,7 +54,8 @@ "pagination": { "strategy": "none" }, - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -108,7 +109,8 @@ "pagination": { "strategy": "offset" }, - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -159,7 +161,8 @@ { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -270,7 +273,8 @@ } ] }, - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/patchable/testdata/parsed.expected b/models/patchable/testdata/parsed.expected index 45e23a88..5abf13ce 100644 --- a/models/patchable/testdata/parsed.expected +++ b/models/patchable/testdata/parsed.expected @@ -219,22 +219,26 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PATCH", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/request/testdata/parsed.expected b/models/request/testdata/parsed.expected index b4a586a0..65fc516e 100644 --- a/models/request/testdata/parsed.expected +++ b/models/request/testdata/parsed.expected @@ -166,17 +166,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -281,7 +284,8 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -390,12 +394,14 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -504,12 +510,14 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -658,7 +666,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -738,12 +747,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -823,12 +834,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -909,12 +922,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -996,12 +1011,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ diff --git a/models/servers/testdata/parsed.expected b/models/servers/testdata/parsed.expected index f5566c77..d0b3b2f9 100644 --- a/models/servers/testdata/parsed.expected +++ b/models/servers/testdata/parsed.expected @@ -141,12 +141,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/simple-resource/testdata/parsed.expected b/models/simple-resource/testdata/parsed.expected index 08294eba..ec7f3737 100644 --- a/models/simple-resource/testdata/parsed.expected +++ b/models/simple-resource/testdata/parsed.expected @@ -144,28 +144,33 @@ "operation": "PUT", "comment": "Actual PUT comment", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "comment": "Actual POST comment", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "DELETE", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -432,12 +437,14 @@ { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -579,7 +586,8 @@ { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -630,7 +638,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/singleton/testdata/parsed.expected b/models/singleton/testdata/parsed.expected index 18ca6ba4..e06ff2a9 100644 --- a/models/singleton/testdata/parsed.expected +++ b/models/singleton/testdata/parsed.expected @@ -112,12 +112,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -168,12 +170,14 @@ { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -225,12 +229,14 @@ { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -281,17 +287,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ @@ -343,7 +352,8 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/stringmaps/testdata/parsed.expected b/models/stringmaps/testdata/parsed.expected index 3f5ba279..f1790f0c 100644 --- a/models/stringmaps/testdata/parsed.expected +++ b/models/stringmaps/testdata/parsed.expected @@ -258,22 +258,26 @@ { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/table/testdata/parsed.expected b/models/table/testdata/parsed.expected index 797fbd28..67029254 100644 --- a/models/table/testdata/parsed.expected +++ b/models/table/testdata/parsed.expected @@ -251,7 +251,8 @@ "parentName": "" } } - ] + ], + "summary": "" }, { "operation": "POST", @@ -303,7 +304,8 @@ "parentName": "" } } - ] + ], + "summary": "" }, { "operation": "MULTIGET", @@ -325,7 +327,8 @@ "parentName": "" } } - ] + ], + "summary": "" }, { "operation": "PUT", @@ -362,7 +365,8 @@ "parentName": "" } } - ] + ], + "summary": "" } ], "parents": [ @@ -432,7 +436,8 @@ "parentName": "" } } - ] + ], + "summary": "" } ], "parents": [ @@ -536,7 +541,8 @@ "parentName": "" } } - ] + ], + "summary": "" } ], "parents": [ @@ -717,22 +723,26 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "MULTIGET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "DELETE", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], diff --git a/models/upversion/testdata/parsed.expected b/models/upversion/testdata/parsed.expected index c5025503..acdabc3b 100644 --- a/models/upversion/testdata/parsed.expected +++ b/models/upversion/testdata/parsed.expected @@ -166,7 +166,8 @@ { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -244,17 +245,20 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "PUT", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -332,12 +336,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [], @@ -415,12 +421,14 @@ { "operation": "POST", "options": [], - "errors": [] + "errors": [], + "summary": "" }, { "operation": "GET", "options": [], - "errors": [] + "errors": [], + "summary": "" } ], "parents": [ diff --git a/src/tests/parser.test.ts b/src/tests/parser.test.ts index ce4d7d1c..0bf61bd1 100644 --- a/src/tests/parser.test.ts +++ b/src/tests/parser.test.ts @@ -25,12 +25,6 @@ c d`) function compare(module: string) { const parser = new ParseGen([`models/${module}`], { ignoreRules: true }) const got = parser.generate() - const sgot = strip(got) - const expected = strip( - readFile(`models/${module}/testdata/parsed.expected`) - ) - if (sgot !== expected) { - console.log(got) - } - expect(sgot).toBe(expected) + const expected = readFile(`models/${module}/testdata/parsed.expected`) + expect(JSON.parse(got)).toStrictEqual(JSON.parse(expected)) } From 5e81bd044a1c35d05783afd5828f86f333c5346b Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 23 Sep 2021 13:34:04 -0500 Subject: [PATCH 11/43] include empty summary if missing --- src/grammar/rest.pegjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/grammar/rest.pegjs b/src/grammar/rest.pegjs index 36956b55..506711a9 100644 --- a/src/grammar/rest.pegjs +++ b/src/grammar/rest.pegjs @@ -122,7 +122,9 @@ operation_summary = "Summary:" _ content:(!"\n" !"\"" i:. {return i})* "\n" "\s" ops = _ comment:operation_description? _ op:(mainops / multiops) _ allOptions: options _ { if (!comment) { - comment = {} + comment = { + summary: "" + } } return { operation: op, From 48d7b155f74020cab16fbaeb85d33f59e1bc26fb Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 23 Sep 2021 13:41:09 -0500 Subject: [PATCH 12/43] fixup: description expects stripWhitespace --- src/grammar/rest.pegjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grammar/rest.pegjs b/src/grammar/rest.pegjs index 506711a9..6aed3f8b 100644 --- a/src/grammar/rest.pegjs +++ b/src/grammar/rest.pegjs @@ -104,13 +104,13 @@ errorcode = _ comment:description? _ code:[0-9]+ { return {"code": code.join(""), "comment": comment} } -operation_description = "\"" _ summary:operation_summary? _ inner:(!"\"" i:. {return i} )* "\"" { +operation_description = "\"" summary:operation_summary? _ inner:(!"\"" i:. {return i} )* "\"" { var description = inner.join("").replace(/\\n/g, "\n") if (!summary) { summary = "" } return { - "description": description, + "description": stripWhitespace(description), "summary": summary } } From 30dbccae6d60e77bdf0f296186fa2900a0ea4080 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 23 Sep 2021 17:03:00 -0500 Subject: [PATCH 13/43] include basic unit tests --- src/tests/parser-summary.test.ts | 67 ++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 src/tests/parser-summary.test.ts diff --git a/src/tests/parser-summary.test.ts b/src/tests/parser-summary.test.ts new file mode 100644 index 00000000..0fe1b099 --- /dev/null +++ b/src/tests/parser-summary.test.ts @@ -0,0 +1,67 @@ +import { loadParser, clean } from "../parse" + +/** parse the reslang files and check that the correct + * abstract syntax tree is being generated + */ +describe("reslang summary parsing tests", () => { + let parser = loadParser(); + + function expected(...operations: any[]) { + return [{ + category: "definition", + type: "resource", + kind: "resource-like", + operations: operations, + future: false, + parents: [], + short: "test", + singleton: false + }]; + } + function operation(operation: string, summary: string, comment?: string) { + return { + summary: summary, + operation: operation, + comment: comment, + options: [], + errors: [] + }; + } + + test("operations should include empty summary by default", () => { + let tree = clean(parser.parse( + `resource test { + /operations + POST + }`, {output: "parser"})); + expect(tree).toEqual(expected(operation("POST", ""))) + }) + test("operations may include only a description", () => { + let tree = clean(parser.parse( + `resource test { + /operations + "my description" + POST + }`, {output: "parser"})); + expect(tree).toEqual(expected(operation("POST", "", "my description"))) + }) + test("operations may include only a summary", () => { + let tree = clean(parser.parse( + `resource test { + /operations + "Summary: my summary" + POST + }`, {output: "parser"})); + expect(tree).toEqual(expected(operation("POST", "my summary", ""))) + }) + test("operations may include both summary and description", () => { + let tree = clean(parser.parse( + `resource test { + /operations + "Summary: my summary + my description" + POST + }`, {output: "parser"})); + expect(tree).toEqual(expected(operation("POST", "my summary", "my description"))) + }) +}) From 935c4cfe3fc890fab56c464d05e538f6aa2abfcd Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 23 Sep 2021 18:33:52 -0500 Subject: [PATCH 14/43] handle three main cases --- src/grammar/rest.pegjs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/grammar/rest.pegjs b/src/grammar/rest.pegjs index 6aed3f8b..a8352441 100644 --- a/src/grammar/rest.pegjs +++ b/src/grammar/rest.pegjs @@ -104,19 +104,27 @@ errorcode = _ comment:description? _ code:[0-9]+ { return {"code": code.join(""), "comment": comment} } -operation_description = "\"" summary:operation_summary? _ inner:(!"\"" i:. {return i} )* "\"" { - var description = inner.join("").replace(/\\n/g, "\n") - if (!summary) { - summary = "" +operation_description = i:summary_only / i:summary_description / description:description { + if (typeof i !== 'undefined') { + return i } + return {"summary": "", "description": description} +} + + +summary_description = "\"" summary:summary "\n" _ description:(!"\"" i:. {return i})* "\"" { return { - "description": stripWhitespace(description), + "description": stripWhitespace(description.join("").replace(/\\n/g, "\n")), "summary": summary } } -operation_summary = "Summary:" _ content:(!"\n" !"\"" i:. {return i})* "\n" "\s"* { - return content.join("") +summary_only = "\"" summary:summary "\"" { + return {"summary": summary, "description": ""} +} + +summary = "Summary:" _ inner:(!"\n" !"\"" i:. {return i})* { + return inner.join("") } ops = From 4af5e7bf68fb71c10e81a50e251519f159519bda Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 23 Sep 2021 18:44:26 -0500 Subject: [PATCH 15/43] include basic unit tests --- src/grammar/rest.pegjs | 2 +- src/tests/parser-summary.test.ts | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/grammar/rest.pegjs b/src/grammar/rest.pegjs index a8352441..a031c6fd 100644 --- a/src/grammar/rest.pegjs +++ b/src/grammar/rest.pegjs @@ -115,7 +115,7 @@ operation_description = i:summary_only / i:summary_description / description:des summary_description = "\"" summary:summary "\n" _ description:(!"\"" i:. {return i})* "\"" { return { "description": stripWhitespace(description.join("").replace(/\\n/g, "\n")), - "summary": summary + "summary": summary.trimRight().replace(/\.$/, "") } } diff --git a/src/tests/parser-summary.test.ts b/src/tests/parser-summary.test.ts index 0fe1b099..e51265da 100644 --- a/src/tests/parser-summary.test.ts +++ b/src/tests/parser-summary.test.ts @@ -64,4 +64,24 @@ describe("reslang summary parsing tests", () => { }`, {output: "parser"})); expect(tree).toEqual(expected(operation("POST", "my summary", "my description"))) }) + test("summaries ignore dangling whitespace", () => { + let tree = clean(parser.parse( + `resource test { + /operations + "Summary: my summary + my description" + POST + }`, {output: "parser"})); + expect(tree).toEqual(expected(operation("POST", "my summary", "my description"))) + }) + test("summaries ignore danling dot", () => { + let tree = clean(parser.parse( + `resource test { + /operations + "Summary: my summary. + my description" + POST + }`, {output: "parser"})); + expect(tree).toEqual(expected(operation("POST", "my summary", "my description"))) + }) }) From aedcb3af324574d28bfb3559d493902dfe8f9ed4 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 15:05:00 -0500 Subject: [PATCH 16/43] include basic unit tests --- src/grammar/rest.pegjs | 2 +- src/tests/parser-summary.test.ts | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/grammar/rest.pegjs b/src/grammar/rest.pegjs index a031c6fd..ec55fee5 100644 --- a/src/grammar/rest.pegjs +++ b/src/grammar/rest.pegjs @@ -115,7 +115,7 @@ operation_description = i:summary_only / i:summary_description / description:des summary_description = "\"" summary:summary "\n" _ description:(!"\"" i:. {return i})* "\"" { return { "description": stripWhitespace(description.join("").replace(/\\n/g, "\n")), - "summary": summary.trimRight().replace(/\.$/, "") + "summary": summary.trimRight() } } diff --git a/src/tests/parser-summary.test.ts b/src/tests/parser-summary.test.ts index e51265da..1fcdf3c2 100644 --- a/src/tests/parser-summary.test.ts +++ b/src/tests/parser-summary.test.ts @@ -74,14 +74,4 @@ describe("reslang summary parsing tests", () => { }`, {output: "parser"})); expect(tree).toEqual(expected(operation("POST", "my summary", "my description"))) }) - test("summaries ignore danling dot", () => { - let tree = clean(parser.parse( - `resource test { - /operations - "Summary: my summary. - my description" - POST - }`, {output: "parser"})); - expect(tree).toEqual(expected(operation("POST", "my summary", "my description"))) - }) }) From 3608387fc4ecc1b449c0cb0f74943da1b032bb22 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 15:45:44 -0500 Subject: [PATCH 17/43] include negative unit tests --- src/tests/parser-summary.test.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tests/parser-summary.test.ts b/src/tests/parser-summary.test.ts index 1fcdf3c2..cc18faf5 100644 --- a/src/tests/parser-summary.test.ts +++ b/src/tests/parser-summary.test.ts @@ -72,6 +72,17 @@ describe("reslang summary parsing tests", () => { my description" POST }`, {output: "parser"})); - expect(tree).toEqual(expected(operation("POST", "my summary", "my description"))) + expect(tree).toEqual(expected(operation("POST", "my summary", "my description"))) + }) + test("summaries cannot be defined in middle lines", () => { + let tree = clean(parser.parse( + `resource test { + /operations + "my description + Summary: my summary + my description" + POST + }`, {output: "parser"})); + expect(tree).toEqual(expected(operation("POST", "", "my description\nSummary: my summary\nmy description"))) }) }) From aa929809ad0964e97d9f233f898522fb5602953c Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 15:51:14 -0500 Subject: [PATCH 18/43] allow leading whitespace before Summary: token --- src/grammar/rest.pegjs | 2 +- src/tests/parser-summary.test.ts | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/grammar/rest.pegjs b/src/grammar/rest.pegjs index ec55fee5..029826ce 100644 --- a/src/grammar/rest.pegjs +++ b/src/grammar/rest.pegjs @@ -123,7 +123,7 @@ summary_only = "\"" summary:summary "\"" { return {"summary": summary, "description": ""} } -summary = "Summary:" _ inner:(!"\n" !"\"" i:. {return i})* { +summary = _ "Summary:" _ inner:(!"\n" !"\"" i:. {return i})* { return inner.join("") } diff --git a/src/tests/parser-summary.test.ts b/src/tests/parser-summary.test.ts index cc18faf5..17219a91 100644 --- a/src/tests/parser-summary.test.ts +++ b/src/tests/parser-summary.test.ts @@ -85,4 +85,40 @@ describe("reslang summary parsing tests", () => { }`, {output: "parser"})); expect(tree).toEqual(expected(operation("POST", "", "my description\nSummary: my summary\nmy description"))) }) + test("summaries cannot be defined last line", () => { + let tree = clean(parser.parse( + `resource test { + /operations + "my description + Summary: my summary" + POST + }`, {output: "parser"})); + expect(tree).toEqual(expected(operation("POST", "", "my description\nSummary: my summary"))) + }) + test("summaries may follow white space", () => { + expect(clean(parser.parse( + `resource test { + /operations + " Summary: my summary" + POST + }`, {output: "parser"}))).toEqual(expected( + operation("POST", "my summary", ""))) + expect(clean(parser.parse( + `resource test { + /operations + " Summary: my summary + my description" + POST + }`, {output: "parser"}))).toEqual(expected( + operation("POST", "my summary", "my description"))) + expect(clean(parser.parse( + `resource test { + /operations + " + Summary: my summary + my description" + POST + }`, {output: "parser"}))).toEqual(expected( + operation("POST", "my summary", "my description"))) + }) }) From 715ac5e7e341a4ec50fb146a5aae80061298c9d0 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 27 Sep 2021 16:01:26 -0500 Subject: [PATCH 19/43] Update reference docs --- docs/reference.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/reference.md b/docs/reference.md index fa5fbd66..c675d9ee 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -343,9 +343,27 @@ enum StatusEnum { Note that the literals can include the lowercase, colons, numbers etc. -### 2 types of comments +### Comments -// && /\* \*/ comments are developer only comments. A comment using quotes ("this is a comment") will get transferred to the Swagger description field of the element it appears before. +// && /\* \*/ comments are developer only comments. + +### Descriptions + +Quoted strings (e.g. "this is a description") will get transferred to the Swagger description field of the element it appears before. +These are applicable for most definitions including resources and operations. + +Descriptions for operations (e.g. quoted string preceeding `GET`, `POST`, `PUT`) may also include an optional summary which will be passed to its +corresponding Swagger field. Summaries are usually displayed in the left sidebar in Swagger UI. + +e.g. +``` +resource IntegrationConnection { + /operations + "Summary: Create a new IntegrationConnection + The configProperties and the configuredIdentifierTypeIDs must be consistent with the integration" + POST +} +``` ### Multiget From 73c95bc1377cde105365ee954813c686c498c936 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Wed, 13 Oct 2021 10:47:08 -0500 Subject: [PATCH 20/43] APIE-9: Reslang should not define empty enum Which inadverterdly happens when including a subresource with no defined event operations --- models/eventing/events.reslang | 2 +- models/eventing/testdata/asyncapi.expected | 58 ++++++++++++++++++++++ src/genevents.ts | 28 +++++++---- 3 files changed, 76 insertions(+), 12 deletions(-) diff --git a/models/eventing/events.reslang b/models/eventing/events.reslang index 1574ec53..25d28c02 100644 --- a/models/eventing/events.reslang +++ b/models/eventing/events.reslang @@ -52,7 +52,7 @@ event StartSignal { /payload name: string address: string[1..10] - // foo: value-of v2/TestResource::Foo2 ==> causes event generation to not render correctly, need to find out why + foo: value-of v2/TestResource::Foo2 } produces StartSignal diff --git a/models/eventing/testdata/asyncapi.expected b/models/eventing/testdata/asyncapi.expected index 3c2bd920..837ceace 100644 --- a/models/eventing/testdata/asyncapi.expected +++ b/models/eventing/testdata/asyncapi.expected @@ -242,6 +242,39 @@ components: - id - address description: A REST subresource + v2TestResourceFoo2Header: + type: object + properties: + verb: + description: '' + type: string + location: + description: '' + type: string + format: url + example: 'https://www.domain.com (url)' + ids: + description: '' + items: + type: string + type: array + required: + - verb + - location + - ids + v2TestResourceFoo2Output: + type: object + properties: + id: + type: integer + format: int32 + address: + items: + type: string + type: array + required: + - id + - address StartSignalHeader: type: object properties: @@ -268,9 +301,13 @@ components: minItems: 1 maxItems: 10 type: array + foo: + $ref: '#/components/schemas/v2TestResourceFoo2Output' + type: object required: - name - address + - foo description: Event to start v3StopSignalHeader: type: object @@ -379,6 +416,27 @@ components: - verb - location - ids + v2TestResourceFoo2Header: + headers: + type: object + properties: + verb: + description: '' + type: string + location: + description: '' + type: string + format: url + example: 'https://www.domain.com (url)' + ids: + description: '' + items: + type: string + type: array + required: + - verb + - location + - ids StartSignalHeader: headers: type: object diff --git a/src/genevents.ts b/src/genevents.ts index ac49a92a..07b00a79 100644 --- a/src/genevents.ts +++ b/src/genevents.ts @@ -180,21 +180,12 @@ export default class EventsGen extends BaseGen { private addStandardHeaderDefinition(schemas: any, el: IResourceLike) { const name = camelCase(this.formSingleUniqueName(el)) + "Header" - - // form the array of event verbs - const verbs: string[] = [] - for (const op of el.events || []) { - verbs.push(op.operation) - } + const verb = this.buildVerbProperty(el); schemas[name] = { type: "object", properties: { - verb: { - description: "", - type: "string", - enum: verbs - }, + verb: verb, location: { description: "", type: "string", @@ -214,6 +205,21 @@ export default class EventsGen extends BaseGen { return name } + public buildVerbProperty(el: IResourceLike) { + const verbs: string[] = [] + for (const op of el.events || []) { + verbs.push(op.operation) + } + return verbs.length > 0 ? { + description: "", + type: "string", + "enum": verbs + } : { + description: "", + type: "string", + }; + } + private liftToHeader(name: string, schemas: any, headers: any) { const hdr = schemas[name] headers[name] = { headers: hdr } From 54fed9991aaf2590f3fd859af2623c37d09be866 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Tue, 19 Oct 2021 22:56:31 -0500 Subject: [PATCH 21/43] APIE-41: Add defaults for enums --- src/genbase.ts | 63 +++++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/src/genbase.ts b/src/genbase.ts index 3a9a4fca..0928da2f 100644 --- a/src/genbase.ts +++ b/src/genbase.ts @@ -16,6 +16,7 @@ import { IUnion, isStructure, isEvent, + isEnum, IServers, isProduces, isConsumes, @@ -1111,7 +1112,6 @@ Actions cannot have subresources` // if this is a stringmap then add it const type = attr.type const name = type.name - const sane = camelCase(name) // allow description overrides by caller if (!obj.description) { @@ -1126,14 +1126,7 @@ Actions cannot have subresources` } const schema = schemaLevel ? obj.schema : obj - const prim = isPrimitiveType(name) - - // can only have a default if it is a primitive - if (!prim && attr.default) { - throw Error( - "Can only have defaults on primitive attributes: " + attr.name - ) - } + this.validateDefaults(name, attr); if (attr.stringMap && !suppressStringmap) { schema.type = "object" @@ -1144,7 +1137,7 @@ Actions cannot have subresources` true, true ) - } else if (prim) { + } else if (isPrimitiveType(name)) { this.translatePrimitive( attr, type.name, @@ -1157,28 +1150,20 @@ Actions cannot have subresources` switch (def.kind) { case "structure": case "union": + this.setSchemaRefs(schema, name) + schema.type = "object" + break case "enum": - if (this.generateAllOf) { - schema.allOf = [ - { $ref: `#/components/schemas/${sane}` } - ] - } else { - schema.$ref = `#/components/schemas/${sane}` - } - schema.type = def.kind === "enum" ? "string" : "object" + this.setSchemaRefs(schema, name) + schema.type = "string" + this.addDefault(attr, schema, "string") break case "resource-like": // must have a linked annotation if (attr.linked) { this.addLinkedType(def, schema, attr) } else if (attr.full) { - if (this.generateAllOf) { - schema.allOf = [ - { $ref: `#/components/schemas/${sane}Output` } - ] - } else { - schema.$ref = `#/components/schemas/${sane}Output` - } + this.setSchemaRefs(schema, name) schema.type = "object" } else { throw new Error( @@ -1333,4 +1318,30 @@ Actions cannot have subresources` return parts[0] } -} + + protected setSchemaRefs(schema: any, name: string) { + const sane = camelCase(name) + if (this.generateAllOf) { + schema.allOf = [ + {$ref: `#/components/schemas/${sane}`} + ] + } else { + schema.$ref = `#/components/schemas/${sane}` + } + } + + protected validateDefaults(name: string, attr: IAttribute) { + if (!attr.default) { + return // No defaults, nothing to validate + } + if (isPrimitiveType(name)) { + return // Primitive types can have defaults + } + let def = this.extractDefinitionGently(name); + if (def != null && isEnum(def)) { + return // Enum objects can have defaults + } + throw Error( + "Can only have defaults on primitive attributes: " + attr.name + ) + }} From 3ebe02a3a1298c67dd26c21c3f2175edfd956b95 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 02:37:23 -0500 Subject: [PATCH 22/43] fix: bug while validating int defaults --- src/genbase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/genbase.ts b/src/genbase.ts index 0928da2f..b2c1dbdb 100644 --- a/src/genbase.ts +++ b/src/genbase.ts @@ -1077,7 +1077,7 @@ Actions cannot have subresources` case "int": if ( attr.default.type !== "numerical" || - attr.default.type.includes(".") + attr.default.value.includes(".") ) { throw Error( "Attribute " + From 1e6eea7dcd1d649d7afa2166389c7f7f416cb88e Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 02:42:22 -0500 Subject: [PATCH 23/43] add: Enum literals for defaults fix: numerical was too undeterministic. Empty string was matched as numerical refactor: use / operators and rules to explicitely establish flag chars. --- src/grammar/attributes.pegjs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/grammar/attributes.pegjs b/src/grammar/attributes.pegjs index 63e4ea09..ebd8df5f 100644 --- a/src/grammar/attributes.pegjs +++ b/src/grammar/attributes.pegjs @@ -17,7 +17,7 @@ example = _ "example:" _ format: description _ { return format } -default = _ "default" _ "=" _ value: (boolean / string / numerical) _ { +default = _ "default" _ "=" _ value: (boolean / string / numerical / enum_literal) _ { return value } @@ -25,7 +25,11 @@ boolean = _ val:("true" / "false") { return {"type": "boolean", "value": val} } -numerical = _ val:([\+\-]?[0-9]*("."[0-9]+)?) _ { +sign = "+" / "-" +decimal = ("." [0-9]+) + / ([0-9]+ "." [0-9]+) + / [0-9]+ +numerical = _ val:(sign? decimal) _ { return {"type": "numerical", "value": val.flat().join("")} } @@ -33,6 +37,10 @@ string = _ "\"" val:([^\"]+) "\"" _ { return {"type": "string", "value": val.flat().join("")} } +enum_literal = _ val: literalname _ { + return {"type": "enum", "value": val } +} + array1 = "[" min:([0-9]+)? _ ".." _ max:([0-9]+)? "]" { return {"type": 1, min: min ? parseInt(min.join("")) : null, max: max ? parseInt(max.join("")) : null} } From 3f4e1d90882e8d8a4ed526b54461ff7221184721 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 02:43:09 -0500 Subject: [PATCH 24/43] refactor: extract common message --- src/genbase.ts | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/genbase.ts b/src/genbase.ts index b2c1dbdb..27d379c9 100644 --- a/src/genbase.ts +++ b/src/genbase.ts @@ -1053,24 +1053,20 @@ Actions cannot have subresources` if (!attr || !attr.default) { return } + const invalidDefaultValue = "Attribute " + attr.name + + " can only have a " + type + " default value" + + " but " + attr.default.type + " value " + attr.default.value + + " was found instead" switch (type) { case "boolean": if (attr.default.type !== "boolean") { - throw Error( - "Attribute " + - attr.name + - " can only have a boolean default value" - ) + throw Error(invalidDefaultValue) } schema.default = attr.default.value === "true" break case "string": if (attr.default.type !== "string") { - throw Error( - "Attribute " + - attr.name + - " can only have a string default value" - ) + throw Error(invalidDefaultValue) } schema.default = attr.default.value break @@ -1079,21 +1075,13 @@ Actions cannot have subresources` attr.default.type !== "numerical" || attr.default.value.includes(".") ) { - throw Error( - "Attribute " + - attr.name + - " can only have an integer default value" - ) + throw Error(invalidDefaultValue) } schema.default = Number.parseInt(attr.default.value, 10) break case "double": if (attr.default.type !== "numerical") { - throw Error( - "Attribute " + - attr.name + - " can only have a numerical default value" - ) + throw Error(invalidDefaultValue) } schema.default = Number.parseFloat(attr.default.value) break From e7e258b7e312677279520fdd6384c3f4773c4ad2 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 02:56:58 -0500 Subject: [PATCH 25/43] add: Generator logic for enum default values --- src/genbase.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/genbase.ts b/src/genbase.ts index 27d379c9..7c74ae42 100644 --- a/src/genbase.ts +++ b/src/genbase.ts @@ -1085,6 +1085,20 @@ Actions cannot have subresources` } schema.default = Number.parseFloat(attr.default.value) break + case "enum": + const def = this.extractDefinition(attr.type.name) as IEnum + const literals = def.literals || []; + const invalidEnumDefaultValue = "Attribute " + attr.name + + " expected one of [" + literals.join(", ") + "] as default value" + + " but " + attr.default.value + " was found instead" + if (attr.default.type !== "enum") { + throw Error(invalidEnumDefaultValue) + } + if (!literals.includes(attr.default.value)) { + throw Error(invalidEnumDefaultValue) + } + schema.default = attr.default.value + break } } @@ -1144,7 +1158,7 @@ Actions cannot have subresources` case "enum": this.setSchemaRefs(schema, name) schema.type = "string" - this.addDefault(attr, schema, "string") + this.addDefault(attr, schema, "enum") break case "resource-like": // must have a linked annotation From 91c4ce3d1873fd0652fe427bb92fd94d2d71219d Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 02:57:54 -0500 Subject: [PATCH 26/43] update validation message --- src/genbase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/genbase.ts b/src/genbase.ts index 7c74ae42..319ea5a5 100644 --- a/src/genbase.ts +++ b/src/genbase.ts @@ -1344,6 +1344,6 @@ Actions cannot have subresources` return // Enum objects can have defaults } throw Error( - "Can only have defaults on primitive attributes: " + attr.name + "Can only have defaults on primitive attributes or enums: " + attr.name ) }} From 4748ea9f018ef763d9f6b3caf53b729f7e391c99 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 03:01:39 -0500 Subject: [PATCH 27/43] inline for consistency --- src/genbase.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/genbase.ts b/src/genbase.ts index 319ea5a5..3522b3b2 100644 --- a/src/genbase.ts +++ b/src/genbase.ts @@ -1087,15 +1087,14 @@ Actions cannot have subresources` break case "enum": const def = this.extractDefinition(attr.type.name) as IEnum - const literals = def.literals || []; - const invalidEnumDefaultValue = "Attribute " + attr.name + - " expected one of [" + literals.join(", ") + "] as default value" + - " but " + attr.default.value + " was found instead" - if (attr.default.type !== "enum") { - throw Error(invalidEnumDefaultValue) - } - if (!literals.includes(attr.default.value)) { - throw Error(invalidEnumDefaultValue) + const literals = def.literals || [] + if ( + attr.default.type !== "enum" || + !literals.includes(attr.default.value) + ) { + throw Error("Attribute " + attr.name + + " expected one of [" + literals.join(", ") + "] as default value" + + " but " + attr.default.value + " was found instead") } schema.default = attr.default.value break From d2be01ba5a266365e21684307a9c2aff6166a6d5 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 10:50:36 -0500 Subject: [PATCH 28/43] fixup: numerical returned [1,2,3.9] instead of 123.9 caught by parser(stringmaps) `$` operator in pegjs means catch whole match as string Should be helpful in all cases where join("") is used --- src/grammar/attributes.pegjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grammar/attributes.pegjs b/src/grammar/attributes.pegjs index ebd8df5f..cee70f73 100644 --- a/src/grammar/attributes.pegjs +++ b/src/grammar/attributes.pegjs @@ -29,8 +29,8 @@ sign = "+" / "-" decimal = ("." [0-9]+) / ([0-9]+ "." [0-9]+) / [0-9]+ -numerical = _ val:(sign? decimal) _ { - return {"type": "numerical", "value": val.flat().join("")} +numerical = _ val:$(sign? decimal) _ { + return {"type": "numerical", "value": val} } string = _ "\"" val:([^\"]+) "\"" _ { From bb5a7fda31af1bf63f9b2db72ff1e65f2ac770bb Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 11:46:48 -0500 Subject: [PATCH 29/43] fixup: expected env param --- src/tests/checkrules.test.ts | 4 ++-- src/tests/dotviz.test.ts | 2 +- src/tests/parser.test.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/checkrules.test.ts b/src/tests/checkrules.test.ts index 39ba46c5..5677f06a 100644 --- a/src/tests/checkrules.test.ts +++ b/src/tests/checkrules.test.ts @@ -56,7 +56,7 @@ function check( model: string = "models/checkrules" ) { try { - const _ = new ParseGen([model], rules) + const _ = new ParseGen([model], rules, "PROD") } catch (error) { const got = error.message const correct = got.includes(expected) @@ -76,7 +76,7 @@ function checkFullSwagger( model: string = "models/checkrules" ) { try { - const _ = new SwagGen([model], rules).generate() + const _ = new SwagGen([model], rules, "PROD").generate() } catch (error) { const got = error.message const correct = got.includes(expected) diff --git a/src/tests/dotviz.test.ts b/src/tests/dotviz.test.ts index 4467a186..02a98e69 100644 --- a/src/tests/dotviz.test.ts +++ b/src/tests/dotviz.test.ts @@ -13,7 +13,7 @@ describe("dotviz generation tests", () => { /** compare the output with saved swagger */ function compare(module: string) { - const dotviz = new DotvizGen([`models/${module}`], { ignoreRules: true }) + const dotviz = new DotvizGen([`models/${module}`], { ignoreRules: true }, "PROD") const out = dotviz.generate("main") const got = strip(out) diff --git a/src/tests/parser.test.ts b/src/tests/parser.test.ts index 0bf61bd1..7f400e15 100644 --- a/src/tests/parser.test.ts +++ b/src/tests/parser.test.ts @@ -23,7 +23,7 @@ c d`) }) function compare(module: string) { - const parser = new ParseGen([`models/${module}`], { ignoreRules: true }) + const parser = new ParseGen([`models/${module}`], { ignoreRules: true }, "PROD") const got = parser.generate() const expected = readFile(`models/${module}/testdata/parsed.expected`) expect(JSON.parse(got)).toStrictEqual(JSON.parse(expected)) From 9e53876e1603e3987198051398ddac01ff808899 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 11:49:13 -0500 Subject: [PATCH 30/43] add test --- src/tests/parser-default.test.ts | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/tests/parser-default.test.ts diff --git a/src/tests/parser-default.test.ts b/src/tests/parser-default.test.ts new file mode 100644 index 00000000..60cb2d50 --- /dev/null +++ b/src/tests/parser-default.test.ts @@ -0,0 +1,64 @@ +import {clean, loadParser} from "../parse" + +/** parse the reslang files and check that the correct + * abstract syntax tree is being generated + */ +describe("reslang default parsing tests", () => { + function attributeWithDefault(attrName: string, attrType: string, defaultType: string, defaultValue: string) { + return { + "constraints": {}, + "default": { + "type": defaultType, + "value": defaultValue, + }, + "full": false, + "inline": false, + "linked": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": true, + "optionalGet": false, + "optionalPost": false, + "optionalPut": false, + "output": false, + "query": false, + "queryonly": false, + "representation": false, + }, + "name": attrName, + "stringMap": false, + "type": { + "parents": [], + "short": attrType, + }, + } + } + + let parser = loadParser(); + test("enum defaults should be parsed for primitives", () => { + let tree = clean(parser.parse(` + structure test { + a: double optional + default = 123.9 + b: int optional + default = 123 + c: date optional + default = "12/20/1990" + e: Struct4 inline + f: boolean optional + default = true + g: OperationType optional + default = ADD + }`, {output: "parser"})); + + expect(tree.length).toBe(1) + expect(tree[0].attributes).toBeDefined() + expect(tree[0].attributes).toContainEqual(attributeWithDefault("a", "double", "numerical", "123.9")) + expect(tree[0].attributes).toContainEqual(attributeWithDefault("b", "int", "numerical", "123")) + expect(tree[0].attributes).toContainEqual(attributeWithDefault("c", "date", "string", "12/20/1990")) + expect(tree[0].attributes).toContainEqual(attributeWithDefault("f", "boolean", "boolean", "true")) + expect(tree[0].attributes).toContainEqual(attributeWithDefault("g", "OperationType", "enum", "ADD")) + }) +}); + From bf7480108123bb7208a5ed116c2100ebaf766576 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 12:28:35 -0500 Subject: [PATCH 31/43] fixup: eventing tests --- models/eventing/testdata/asyncapi.expected | 2 +- models/eventing/testdata/dotviz.expected | 2 +- models/eventing/testdata/parsed.expected | 29 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/models/eventing/testdata/asyncapi.expected b/models/eventing/testdata/asyncapi.expected index 837ceace..f8de40f9 100644 --- a/models/eventing/testdata/asyncapi.expected +++ b/models/eventing/testdata/asyncapi.expected @@ -302,7 +302,7 @@ components: maxItems: 10 type: array foo: - $ref: '#/components/schemas/v2TestResourceFoo2Output' + $ref: '#/components/schemas/v2TestResourceFoo2' type: object required: - name diff --git a/models/eventing/testdata/dotviz.expected b/models/eventing/testdata/dotviz.expected index 7cc2f3ee..f72e0f09 100644 --- a/models/eventing/testdata/dotviz.expected +++ b/models/eventing/testdata/dotviz.expected @@ -46,7 +46,7 @@ digraph G { "v2/TestResource" -> "v2/TestResource::Foo2" [dir="back" arrowtail="ediamond" label=< subresource >]; "StartSignal" [label=< -
StartSignal
name: string
address: string[1..10]
name: string
time: datetime
>]; + StartSignal
name: stringaddress: string[1..10]foo: Foo2name: stringtime: datetime>]; "v3/StopSignal" [label=<
v3/StopSignal
stopped: datetime
>]; diff --git a/models/eventing/testdata/parsed.expected b/models/eventing/testdata/parsed.expected index 9df84845..0a467468 100644 --- a/models/eventing/testdata/parsed.expected +++ b/models/eventing/testdata/parsed.expected @@ -573,6 +573,35 @@ "representation": false }, "constraints": {} + }, + { + "constraints": {}, + "full": true, + "inline": false, + "linked": false, + "modifiers": { + "flag": false, + "mutable": false, + "optional": false, + "optionalGet": false, + "optionalPost": false, + "optionalPut": false, + "output": false, + "query": false, + "queryonly": false, + "representation": false + }, + "name": "foo", + "stringMap": false, + "type": { + "name": "v2/TestResource::Foo2", + "parentName": "v2/TestResource", + "parentShort": "v2/TestResource", + "parents": [ + "v2/TestResource" + ], + "short": "Foo2" + } } ], "name": "StartSignal", From ac5076b2ff47225d454c45b48f5c33465f598ebe Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 11:57:52 -0500 Subject: [PATCH 32/43] bump version --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index b188c365..861ebd5e 100755 --- a/src/main.ts +++ b/src/main.ts @@ -18,7 +18,7 @@ import JsonSchemaGen from "./genjsonschema" const RULES = "rules.json" const LOCAL_RULES = lpath.join(__dirname, "library", RULES) -export const VERSION = "v6.1.2" +export const VERSION = "v6.1.3" // parse the cmd line const args = yargs From 4a51453ea40f23250e4b9a0e09d7ed5d82356c77 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Thu, 21 Oct 2021 10:38:19 -0500 Subject: [PATCH 33/43] rename param to appease sonarcloud --- src/tests/parser-summary.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/parser-summary.test.ts b/src/tests/parser-summary.test.ts index 17219a91..0d04287c 100644 --- a/src/tests/parser-summary.test.ts +++ b/src/tests/parser-summary.test.ts @@ -18,10 +18,10 @@ describe("reslang summary parsing tests", () => { singleton: false }]; } - function operation(operation: string, summary: string, comment?: string) { + function operation(verb: string, summary: string, comment?: string) { return { summary: summary, - operation: operation, + operation: verb, comment: comment, options: [], errors: [] From d861b63e0057373dfb78033621f83e633efbff0c Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 25 Oct 2021 14:29:18 -0500 Subject: [PATCH 34/43] extract: topicOf() --- src/genevents.ts | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/genevents.ts b/src/genevents.ts index 07b00a79..761b7f4b 100644 --- a/src/genevents.ts +++ b/src/genevents.ts @@ -117,14 +117,8 @@ export default class EventsGen extends BaseGen { const unique = camelCase(this.formSingleUniqueName(el)) if (isResourceLike(el) && !el.future && el.events) { - channels[ - "topics/" + - kebabCase(this.getSpace()) + - "_" + - getVersion(el.name) + - "-" + - kebabCase(el.name) - ] = { + let topic = this.topicOfEventResource(el); + channels[topic] = { description: this.translateDoc(el.comment) || "no documentation", subscribe: { @@ -148,6 +142,7 @@ export default class EventsGen extends BaseGen { all.forEach((name) => { const def = this.extractDefinition(name) + const topic = this.topicOfDefiniton(def); const unq = camelCase(this.formSingleUniqueName(def)) const details: any = { description: @@ -178,6 +173,24 @@ export default class EventsGen extends BaseGen { }) } + private topicOfDefiniton(def: IReference) { + let ns = this.mainNamespace; + let version = getVersion(def.name); + let name = kebabCase(def.short); + return this.sanitizeTopic(ns, version, name); + } + + private topicOfEventResource(el: IResourceLike) { + let ns = kebabCase(this.getSpace()); + let version = getVersion(el.name); + let name = kebabCase(el.name); + return this.sanitizeTopic(ns, version, name); + } + + private sanitizeTopic(ns: string | undefined, version: string, name: string) { + return `topics/${ns}_${version}-${name}`; + } + private addStandardHeaderDefinition(schemas: any, el: IResourceLike) { const name = camelCase(this.formSingleUniqueName(el)) + "Header" const verb = this.buildVerbProperty(el); From 6f466ef1c545f535e24c43bb015b77e3c636ddd5 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 25 Oct 2021 14:30:30 -0500 Subject: [PATCH 35/43] fixup: publish/subscribe event channels ignore namespace --- src/genevents.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/genevents.ts b/src/genevents.ts index 761b7f4b..185500d9 100644 --- a/src/genevents.ts +++ b/src/genevents.ts @@ -162,19 +162,12 @@ export default class EventsGen extends BaseGen { details.subscribe = msg } - channels[ - "topics/" + - this.mainNamespace + - "_" + - getVersion(def.name) + - "-" + - kebabCase(def.short) - ] = details + channels[topic] = details }) } private topicOfDefiniton(def: IReference) { - let ns = this.mainNamespace; + let ns = kebabCase(this.getSpace()); let version = getVersion(def.name); let name = kebabCase(def.short); return this.sanitizeTopic(ns, version, name); From b830a7fcd367d3940b3ea54cdea16ece42aa3140 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 25 Oct 2021 14:47:01 -0500 Subject: [PATCH 36/43] rename to something that makes more sense --- src/genevents.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/genevents.ts b/src/genevents.ts index 185500d9..59348f7c 100644 --- a/src/genevents.ts +++ b/src/genevents.ts @@ -117,7 +117,7 @@ export default class EventsGen extends BaseGen { const unique = camelCase(this.formSingleUniqueName(el)) if (isResourceLike(el) && !el.future && el.events) { - let topic = this.topicOfEventResource(el); + const topic = this.topicOfRestResource(el); channels[topic] = { description: this.translateDoc(el.comment) || "no documentation", @@ -142,7 +142,7 @@ export default class EventsGen extends BaseGen { all.forEach((name) => { const def = this.extractDefinition(name) - const topic = this.topicOfDefiniton(def); + const topic = this.topicOfAdhocEvent(def); const unq = camelCase(this.formSingleUniqueName(def)) const details: any = { description: @@ -166,21 +166,21 @@ export default class EventsGen extends BaseGen { }) } - private topicOfDefiniton(def: IReference) { + private topicOfAdhocEvent(def: IReference) { let ns = kebabCase(this.getSpace()); let version = getVersion(def.name); let name = kebabCase(def.short); - return this.sanitizeTopic(ns, version, name); + return this.toEventTopic(ns, version, name); } - private topicOfEventResource(el: IResourceLike) { + private topicOfRestResource(el: IReference) { let ns = kebabCase(this.getSpace()); let version = getVersion(el.name); let name = kebabCase(el.name); - return this.sanitizeTopic(ns, version, name); + return this.toEventTopic(ns, version, name); } - private sanitizeTopic(ns: string | undefined, version: string, name: string) { + private toEventTopic(ns: string, version: string, name: string) { return `topics/${ns}_${version}-${name}`; } From 92ae9e0f5168e52c3f17ab9151885d835cdf7f16 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 25 Oct 2021 15:22:46 -0500 Subject: [PATCH 37/43] update tests --- models/eventing/testdata/asyncapi.expected | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/eventing/testdata/asyncapi.expected b/models/eventing/testdata/asyncapi.expected index f8de40f9..f803cf07 100644 --- a/models/eventing/testdata/asyncapi.expected +++ b/models/eventing/testdata/asyncapi.expected @@ -31,21 +31,21 @@ channels: operationId: 'v2/TestResource::Foo' message: $ref: '#/components/messages/v2TestResourceFoo' - topics/eventing_v1-start-signal: + topics/andrew-simple-example_v1-start-signal: description: Event to start publish: summary: 'Adhoc: StartSignal' operationId: StartSignal message: $ref: '#/components/messages/StartSignal' - topics/eventing_v3-stop-signal: + topics/andrew-simple-example_v3-stop-signal: description: Event to stop subscribe: summary: 'Adhoc: v3/StopSignal' operationId: v3/StopSignal message: $ref: '#/components/messages/v3StopSignal' - topics/eventing_v1-directory-delete-incomplete: + topics/andrew-simple-example_v1-directory-delete-incomplete: description: 'If a deletion is corrupted, we generate this event' publish: summary: 'Adhoc: file.DirectoryDeleteIncomplete' From 9b52b92a8cb25e74022fd87c4ca8159dff908100 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 25 Oct 2021 15:36:33 -0500 Subject: [PATCH 38/43] make sure to escape non-identifier chars --- src/genevents.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/genevents.ts b/src/genevents.ts index 59348f7c..1178e178 100644 --- a/src/genevents.ts +++ b/src/genevents.ts @@ -181,7 +181,10 @@ export default class EventsGen extends BaseGen { } private toEventTopic(ns: string, version: string, name: string) { - return `topics/${ns}_${version}-${name}`; + const basic = `${ns}_${version}-${name}`; + const escaped = basic.replace(/[^a-zA-Z0-9_-]/, "_"); + const prefixed = "topics/" + escaped; + return prefixed } private addStandardHeaderDefinition(schemas: any, el: IResourceLike) { From 0c36f0795598c19fdfb309a5a3a71b3fbc0fda09 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 25 Oct 2021 15:44:51 -0500 Subject: [PATCH 39/43] bump version --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 861ebd5e..30a66ceb 100755 --- a/src/main.ts +++ b/src/main.ts @@ -18,7 +18,7 @@ import JsonSchemaGen from "./genjsonschema" const RULES = "rules.json" const LOCAL_RULES = lpath.join(__dirname, "library", RULES) -export const VERSION = "v6.1.3" +export const VERSION = "v6.1.4" // parse the cmd line const args = yargs From c3b9e4d2e9799e342f99a83a0679c36f63b42e27 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Tue, 26 Oct 2021 17:28:42 -0500 Subject: [PATCH 40/43] add: nullable modifier refactor: do not hardcode modifiers captured obj --- src/genbase.ts | 3 +++ src/grammar/attributes.pegjs | 25 +++++++++++++++++++------ src/treetypes.ts | 1 + 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/genbase.ts b/src/genbase.ts index 3522b3b2..faef6b40 100644 --- a/src/genbase.ts +++ b/src/genbase.ts @@ -1189,6 +1189,9 @@ Actions cannot have subresources` this.pushArrayDown(schema, attr.array.min, attr.array.max) } + if (attr.modifiers.nullable) { + schema.nullable = true + } return obj } diff --git a/src/grammar/attributes.pegjs b/src/grammar/attributes.pegjs index cee70f73..fb1acb11 100644 --- a/src/grammar/attributes.pegjs +++ b/src/grammar/attributes.pegjs @@ -47,12 +47,25 @@ array1 = "[" min:([0-9]+)? _ ".." _ max:([0-9]+)? "]" { array2 = "[]" { return {"type": 2} } -modifiers = modifiers:(_ ("flag" / "mutable" / "output" /"optional-post" / "optional-put" / "optional-get" / "queryonly" / "query" / "representation" / "optional")(__ / ";"))* { - var flat = modifiers.flat() - return {flag: flat.includes("flag"), mutable: flat.includes("mutable"), optional: flat.includes("optional"), - optionalPost: flat.includes("optional-post"), optionalPut: flat.includes("optional-put"), - optionalGet: flat.includes("optional-get"), output: flat.includes("output"), - queryonly: flat.includes("queryonly"), query: flat.includes("query"), representation: flat.includes("representation")} +modifiers = modifiers:modifiers_elem* { return Object.assign({}, ...modifiers) } +modifiers_elem = _ it:modifier (__ / ";") { return it } +modifier = + ( "flag" + / "mutable" + / "output" + / "optional-post" + / "optional-put" + / "optional-get" + / "queryonly" + / "query" + / "representation" + / "optional" + / "nullable" + ) { + const kebabCase = /-./g + const camelCase = function(s) { return s[1].toUpperCase() } + const key = text().replace(kebabCase, camelCase) + return {[key]: true} } constraints = constraints:(_ (maxLength / minLength) (__ / ";"))* { diff --git a/src/treetypes.ts b/src/treetypes.ts index fab5a708..8b9e98de 100644 --- a/src/treetypes.ts +++ b/src/treetypes.ts @@ -234,6 +234,7 @@ export interface IModifiers { query: boolean queryonly: boolean representation: boolean + nullable: boolean } export interface IConstraints { From 9394a2ddeb90c544b5f95558c95665844c90b1bf Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 1 Nov 2021 13:52:24 -0600 Subject: [PATCH 41/43] update tests --- models/authorization/testdata/parsed.expected | 48 ++++-- models/checkrules/testdata/parsed.expected | 51 ++++-- .../complex-resource/testdata/parsed.expected | 102 ++++++++---- models/direct2dist/testdata/parsed.expected | 111 ++++++++----- models/distribution/testdata/parsed.expected | 99 ++++++++---- models/eventing/testdata/parsed.expected | 147 ++++++++++++------ models/file/testdata/parsed.expected | 84 ++++++---- .../project_A/testdata/parsed.expected | 33 ++-- models/linked/testdata/parsed.expected | 36 +++-- models/milkman/testdata/parsed.expected | 54 ++++--- models/multi/testdata/parsed.expected | 21 ++- models/multiplicity/testdata/parsed.expected | 24 ++- models/namespaces/testdata/parsed.expected | 21 ++- models/optionality/testdata/parsed.expected | 24 ++- models/pagination/testdata/parsed.expected | 24 ++- models/patchable/testdata/parsed.expected | 30 ++-- models/request/testdata/parsed.expected | 84 ++++++---- models/servers/testdata/parsed.expected | 24 ++- .../simple-resource/testdata/parsed.expected | 54 ++++--- models/singleton/testdata/parsed.expected | 27 ++-- models/stringmaps/testdata/parsed.expected | 66 +++++--- models/table/testdata/parsed.expected | 48 ++++-- models/upversion/testdata/parsed.expected | 39 +++-- src/grammar/attributes.pegjs | 14 +- src/tests/parser-default.test.ts | 1 + 25 files changed, 848 insertions(+), 418 deletions(-) diff --git a/models/authorization/testdata/parsed.expected b/models/authorization/testdata/parsed.expected index e8efc83b..df045d71 100644 --- a/models/authorization/testdata/parsed.expected +++ b/models/authorization/testdata/parsed.expected @@ -51,7 +51,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -78,7 +79,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -105,7 +107,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -137,7 +140,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -164,7 +168,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -239,7 +244,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -293,7 +299,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -356,7 +363,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -383,7 +391,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -410,7 +419,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -474,7 +484,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -501,7 +512,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -528,7 +540,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -666,7 +679,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -694,7 +708,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -722,7 +737,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/checkrules/testdata/parsed.expected b/models/checkrules/testdata/parsed.expected index 7c18ce2d..0a89611a 100644 --- a/models/checkrules/testdata/parsed.expected +++ b/models/checkrules/testdata/parsed.expected @@ -76,7 +76,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -103,7 +104,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -130,7 +132,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -157,7 +160,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -215,7 +219,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -242,7 +247,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -301,7 +307,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -328,7 +335,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -390,7 +398,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -417,7 +426,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -479,7 +489,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -506,7 +517,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -566,7 +578,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -613,7 +626,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -668,7 +682,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -696,7 +711,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -724,7 +740,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/complex-resource/testdata/parsed.expected b/models/complex-resource/testdata/parsed.expected index 954e30dc..afcdb874 100644 --- a/models/complex-resource/testdata/parsed.expected +++ b/models/complex-resource/testdata/parsed.expected @@ -57,7 +57,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -84,7 +85,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -111,7 +113,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -138,7 +141,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -165,7 +169,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -193,7 +198,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -221,7 +227,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -252,7 +259,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -279,7 +287,8 @@ "output": false, "queryonly": false, "query": false, - "representation": true + "representation": true, + "nullable": false }, "constraints": {} } @@ -360,7 +369,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -387,7 +397,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -429,7 +440,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -456,7 +468,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -596,7 +609,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": { "minLength": 10, @@ -626,7 +640,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -653,7 +668,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -733,7 +749,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "example": "This is a company name" @@ -761,7 +778,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "example": "This is the company website http://{id}}.liveramp.com" @@ -792,7 +810,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "example": "Array of urls" @@ -820,7 +839,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -851,7 +871,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -878,7 +899,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -920,7 +942,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -947,7 +970,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1005,7 +1029,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1050,7 +1075,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1096,7 +1122,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1148,7 +1175,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1211,7 +1239,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1239,7 +1268,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1267,7 +1297,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1346,7 +1377,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1374,7 +1406,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1402,7 +1435,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/direct2dist/testdata/parsed.expected b/models/direct2dist/testdata/parsed.expected index d1ef6943..a474206b 100644 --- a/models/direct2dist/testdata/parsed.expected +++ b/models/direct2dist/testdata/parsed.expected @@ -136,7 +136,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -166,7 +167,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -194,7 +196,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -222,7 +225,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -253,7 +257,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -281,7 +286,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -309,7 +315,8 @@ "output": true, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -337,7 +344,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -365,7 +373,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -392,7 +401,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -420,7 +430,8 @@ "output": false, "queryonly": true, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -448,7 +459,8 @@ "output": false, "queryonly": true, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -476,7 +488,8 @@ "output": false, "queryonly": true, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -504,7 +517,8 @@ "output": false, "queryonly": true, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -532,7 +546,8 @@ "output": false, "queryonly": true, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -601,7 +616,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -656,7 +672,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -761,7 +778,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -788,7 +806,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -829,7 +848,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -870,7 +890,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -897,7 +918,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -938,7 +960,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -965,7 +988,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1006,7 +1030,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1033,7 +1058,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1074,7 +1100,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1118,7 +1145,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1146,7 +1174,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1174,7 +1203,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1215,7 +1245,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1242,7 +1273,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1283,7 +1315,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1327,7 +1360,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1383,7 +1417,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1411,7 +1446,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1439,7 +1475,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/distribution/testdata/parsed.expected b/models/distribution/testdata/parsed.expected index eb290041..32a5a978 100644 --- a/models/distribution/testdata/parsed.expected +++ b/models/distribution/testdata/parsed.expected @@ -52,7 +52,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -79,7 +80,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -146,7 +148,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -173,7 +176,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -200,7 +204,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -272,7 +277,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -299,7 +305,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -329,7 +336,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -358,7 +366,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -433,7 +442,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -462,7 +472,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -503,7 +514,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -598,7 +610,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -625,7 +638,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -652,7 +666,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -681,7 +696,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -710,7 +726,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -739,7 +756,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -769,7 +787,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -840,7 +859,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -867,7 +887,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -894,7 +915,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -935,7 +957,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -962,7 +985,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -989,7 +1013,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1054,7 +1079,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1081,7 +1107,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1146,7 +1173,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1173,7 +1201,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1200,7 +1229,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1340,7 +1370,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1368,7 +1399,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1396,7 +1428,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/eventing/testdata/parsed.expected b/models/eventing/testdata/parsed.expected index 0a467468..b21bdca2 100644 --- a/models/eventing/testdata/parsed.expected +++ b/models/eventing/testdata/parsed.expected @@ -83,7 +83,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -110,7 +111,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -177,7 +179,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -204,7 +207,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -231,7 +235,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -301,7 +306,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -331,7 +337,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -389,7 +396,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -419,7 +427,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -479,7 +488,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": { "minLength": 10, @@ -509,7 +519,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -538,7 +549,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -570,7 +582,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -589,7 +602,8 @@ "output": false, "query": false, "queryonly": false, - "representation": false + "representation": false, + "nullable": false }, "name": "foo", "stringMap": false, @@ -660,7 +674,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -689,7 +704,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -769,7 +785,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -796,7 +813,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -954,7 +972,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -981,7 +1000,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1046,7 +1066,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1073,7 +1094,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1100,7 +1122,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1128,7 +1151,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1155,7 +1179,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1186,7 +1211,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1216,7 +1242,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1312,7 +1339,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1357,7 +1385,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1384,7 +1413,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1411,7 +1441,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1438,7 +1469,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1465,7 +1497,8 @@ "output": false, "queryonly": true, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1539,7 +1572,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1566,7 +1600,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1652,7 +1687,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1681,7 +1717,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1708,7 +1745,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1770,7 +1808,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1797,7 +1836,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1868,7 +1908,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1895,7 +1936,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1925,7 +1967,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1977,7 +2020,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -2005,7 +2049,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -2033,7 +2078,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -2112,7 +2158,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -2140,7 +2187,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -2168,7 +2216,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/file/testdata/parsed.expected b/models/file/testdata/parsed.expected index 549c5260..7b486343 100644 --- a/models/file/testdata/parsed.expected +++ b/models/file/testdata/parsed.expected @@ -142,7 +142,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -169,7 +170,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -234,7 +236,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -261,7 +264,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -288,7 +292,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -316,7 +321,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -343,7 +349,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -374,7 +381,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -404,7 +412,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -500,7 +509,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -545,7 +555,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -572,7 +583,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -599,7 +611,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -626,7 +639,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -653,7 +667,8 @@ "output": false, "queryonly": true, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -727,7 +742,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -754,7 +770,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -840,7 +857,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -869,7 +887,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -896,7 +915,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -958,7 +978,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -985,7 +1006,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1056,7 +1078,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1083,7 +1106,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1113,7 +1137,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1165,7 +1190,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1193,7 +1219,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1221,7 +1248,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/imported-subresources/project_A/testdata/parsed.expected b/models/imported-subresources/project_A/testdata/parsed.expected index 4438b616..6eaa9283 100644 --- a/models/imported-subresources/project_A/testdata/parsed.expected +++ b/models/imported-subresources/project_A/testdata/parsed.expected @@ -47,7 +47,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -77,7 +78,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -162,7 +164,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -206,7 +209,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -233,7 +237,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -289,7 +294,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -317,7 +323,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -345,7 +352,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -424,7 +432,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -452,7 +461,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -480,7 +490,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/linked/testdata/parsed.expected b/models/linked/testdata/parsed.expected index 82694f31..61dab9b6 100644 --- a/models/linked/testdata/parsed.expected +++ b/models/linked/testdata/parsed.expected @@ -76,7 +76,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -128,7 +129,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -181,7 +183,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -208,7 +211,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -238,7 +242,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "example": "List of urls" @@ -266,7 +271,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -296,7 +302,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -325,7 +332,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -357,7 +365,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -420,7 +429,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -448,7 +458,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -476,7 +487,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/milkman/testdata/parsed.expected b/models/milkman/testdata/parsed.expected index f3eaccba..5387464b 100644 --- a/models/milkman/testdata/parsed.expected +++ b/models/milkman/testdata/parsed.expected @@ -51,7 +51,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -81,7 +82,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -108,7 +110,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -138,7 +141,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -165,7 +169,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -238,7 +243,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -265,7 +271,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -320,7 +327,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -347,7 +355,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -404,7 +413,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -456,7 +466,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -483,7 +494,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -510,7 +522,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -568,7 +581,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -612,7 +626,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -692,7 +707,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -720,7 +736,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -748,7 +765,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/multi/testdata/parsed.expected b/models/multi/testdata/parsed.expected index 22e9ffe7..b517561c 100644 --- a/models/multi/testdata/parsed.expected +++ b/models/multi/testdata/parsed.expected @@ -76,7 +76,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -103,7 +104,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -133,7 +135,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -233,7 +236,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -285,7 +289,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -313,7 +318,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -341,7 +347,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/multiplicity/testdata/parsed.expected b/models/multiplicity/testdata/parsed.expected index fc165138..e7babf40 100644 --- a/models/multiplicity/testdata/parsed.expected +++ b/models/multiplicity/testdata/parsed.expected @@ -76,7 +76,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -108,7 +109,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -139,7 +141,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -170,7 +173,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -200,7 +204,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -263,7 +268,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -291,7 +297,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -319,7 +326,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/namespaces/testdata/parsed.expected b/models/namespaces/testdata/parsed.expected index 575affe2..e3d11a80 100644 --- a/models/namespaces/testdata/parsed.expected +++ b/models/namespaces/testdata/parsed.expected @@ -35,7 +35,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -99,7 +100,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -223,7 +225,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -287,7 +290,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -363,7 +367,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -391,7 +396,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -419,7 +425,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/optionality/testdata/parsed.expected b/models/optionality/testdata/parsed.expected index a40d3706..1df2efc0 100644 --- a/models/optionality/testdata/parsed.expected +++ b/models/optionality/testdata/parsed.expected @@ -77,7 +77,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -104,7 +105,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -131,7 +133,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -158,7 +161,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -185,7 +189,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -270,7 +275,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -298,7 +304,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -326,7 +333,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/pagination/testdata/parsed.expected b/models/pagination/testdata/parsed.expected index 2f446e5d..6fdc608c 100644 --- a/models/pagination/testdata/parsed.expected +++ b/models/pagination/testdata/parsed.expected @@ -42,7 +42,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -97,7 +98,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -152,7 +154,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -204,7 +207,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -231,7 +235,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -343,7 +348,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -371,7 +377,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -399,7 +406,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/patchable/testdata/parsed.expected b/models/patchable/testdata/parsed.expected index 5abf13ce..26f5ee86 100644 --- a/models/patchable/testdata/parsed.expected +++ b/models/patchable/testdata/parsed.expected @@ -67,7 +67,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -94,7 +95,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -125,7 +127,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -156,7 +159,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -183,7 +187,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -210,7 +215,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -280,7 +286,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -336,7 +343,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -364,7 +372,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -392,7 +401,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/request/testdata/parsed.expected b/models/request/testdata/parsed.expected index 65fc516e..c57bc72c 100644 --- a/models/request/testdata/parsed.expected +++ b/models/request/testdata/parsed.expected @@ -76,7 +76,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -103,7 +104,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -130,7 +132,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -157,7 +160,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -221,7 +225,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -248,7 +253,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -275,7 +281,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -328,7 +335,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -355,7 +363,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -385,7 +394,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -444,7 +454,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -471,7 +482,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -501,7 +513,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -561,7 +574,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -588,7 +602,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -630,7 +645,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -657,7 +673,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -711,7 +728,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -738,7 +756,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -798,7 +817,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -825,7 +845,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -886,7 +907,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -913,7 +935,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -975,7 +998,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1002,7 +1026,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -1092,7 +1117,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1120,7 +1146,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -1148,7 +1175,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/servers/testdata/parsed.expected b/models/servers/testdata/parsed.expected index d0b3b2f9..ecd38331 100644 --- a/models/servers/testdata/parsed.expected +++ b/models/servers/testdata/parsed.expected @@ -105,7 +105,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -132,7 +133,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -250,7 +252,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -278,7 +281,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -306,7 +310,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -358,7 +363,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -386,7 +392,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -414,7 +421,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/simple-resource/testdata/parsed.expected b/models/simple-resource/testdata/parsed.expected index ec7f3737..5c8dd237 100644 --- a/models/simple-resource/testdata/parsed.expected +++ b/models/simple-resource/testdata/parsed.expected @@ -77,7 +77,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": { "minLength": 10, @@ -107,7 +108,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -134,7 +136,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -214,7 +217,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "example": "This is a company name" @@ -242,7 +246,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "example": "This is the company website http://{id}}.liveramp.com" @@ -273,7 +278,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "example": "Array of urls" @@ -301,7 +307,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -332,7 +339,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -359,7 +367,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -401,7 +410,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -428,7 +438,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -486,7 +497,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -531,7 +543,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -577,7 +590,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -629,7 +643,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -692,7 +707,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -720,7 +736,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -748,7 +765,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/singleton/testdata/parsed.expected b/models/singleton/testdata/parsed.expected index e06ff2a9..60ee4ad8 100644 --- a/models/singleton/testdata/parsed.expected +++ b/models/singleton/testdata/parsed.expected @@ -76,7 +76,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -103,7 +104,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -161,7 +163,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -220,7 +223,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -278,7 +282,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -343,7 +348,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -406,7 +412,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -434,7 +441,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -462,7 +470,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/stringmaps/testdata/parsed.expected b/models/stringmaps/testdata/parsed.expected index f1790f0c..c10d4fec 100644 --- a/models/stringmaps/testdata/parsed.expected +++ b/models/stringmaps/testdata/parsed.expected @@ -76,7 +76,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -103,7 +104,8 @@ "output": false, "queryonly": false, "query": true, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -134,7 +136,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -164,7 +167,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -191,7 +195,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -222,7 +227,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -249,7 +255,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -319,7 +326,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -360,7 +368,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -387,7 +396,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -428,7 +438,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -455,7 +466,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -482,7 +494,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -523,7 +536,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -554,7 +568,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -581,7 +596,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -612,7 +628,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -639,7 +656,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {}, "default": { @@ -684,7 +702,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -736,7 +755,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -764,7 +784,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -792,7 +813,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/table/testdata/parsed.expected b/models/table/testdata/parsed.expected index 67029254..654279e8 100644 --- a/models/table/testdata/parsed.expected +++ b/models/table/testdata/parsed.expected @@ -51,7 +51,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -79,7 +80,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": { "maxLength": 255 @@ -109,7 +111,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -137,7 +140,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -169,7 +173,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -197,7 +202,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -225,7 +231,8 @@ "output": true, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -410,7 +417,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -482,7 +490,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -515,7 +524,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -603,7 +613,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -687,7 +698,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -714,7 +726,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -795,7 +808,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -823,7 +837,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -851,7 +866,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/models/upversion/testdata/parsed.expected b/models/upversion/testdata/parsed.expected index acdabc3b..fbb43b90 100644 --- a/models/upversion/testdata/parsed.expected +++ b/models/upversion/testdata/parsed.expected @@ -76,7 +76,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -103,7 +104,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -130,7 +132,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -157,7 +160,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -209,7 +213,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -236,7 +241,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -300,7 +306,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -327,7 +334,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -385,7 +393,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -412,7 +421,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } @@ -482,7 +492,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -510,7 +521,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} }, @@ -538,7 +550,8 @@ "output": false, "queryonly": false, "query": false, - "representation": false + "representation": false, + "nullable": false }, "constraints": {} } diff --git a/src/grammar/attributes.pegjs b/src/grammar/attributes.pegjs index fb1acb11..8f98aa36 100644 --- a/src/grammar/attributes.pegjs +++ b/src/grammar/attributes.pegjs @@ -47,7 +47,19 @@ array1 = "[" min:([0-9]+)? _ ".." _ max:([0-9]+)? "]" { array2 = "[]" { return {"type": 2} } -modifiers = modifiers:modifiers_elem* { return Object.assign({}, ...modifiers) } +modifiers = modifiers:modifiers_elem* { return Object.assign({ + "flag": false, + "mutable": false, + "optional": false, + "optionalGet": false, + "optionalPost": false, + "optionalPut": false, + "output": false, + "query": false, + "queryonly": false, + "representation": false, + "nullable": false +}, ...modifiers) } modifiers_elem = _ it:modifier (__ / ";") { return it } modifier = ( "flag" diff --git a/src/tests/parser-default.test.ts b/src/tests/parser-default.test.ts index 60cb2d50..be21308c 100644 --- a/src/tests/parser-default.test.ts +++ b/src/tests/parser-default.test.ts @@ -25,6 +25,7 @@ describe("reslang default parsing tests", () => { "query": false, "queryonly": false, "representation": false, + "nullable": false }, "name": attrName, "stringMap": false, From a42563a3cb8f5706de260274f11c1c1bcbceae69 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Mon, 1 Nov 2021 15:02:44 -0600 Subject: [PATCH 42/43] bump version --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 30a66ceb..902f53be 100755 --- a/src/main.ts +++ b/src/main.ts @@ -18,7 +18,7 @@ import JsonSchemaGen from "./genjsonschema" const RULES = "rules.json" const LOCAL_RULES = lpath.join(__dirname, "library", RULES) -export const VERSION = "v6.1.4" +export const VERSION = "v6.1.5" // parse the cmd line const args = yargs From 6e6b5ba7838206e9e21062fe8cb23a1941261762 Mon Sep 17 00:00:00 2001 From: Ezequiel Rosas Date: Fri, 5 Nov 2021 16:17:04 -0600 Subject: [PATCH 43/43] release 6.2.1 --- docs/releases.md | 10 ++++++++++ package.json | 2 +- src/main.ts | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/releases.md b/docs/releases.md index d9602dd6..64ac9ca2 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -1,3 +1,13 @@ +## 6.2.1 11/05/2021 + +- Add `nullable`: Added support to generate nullable attributes in schemas for swagger specs. +- Fix event namespaces: `AdHoc` channels for events did not respect namespaces when generating topic names. +- Add `default` modifier to enum attributes. Enum and primitves properties now can set a default value. +- Fix verb enum: events that included a rest resource generated an invalid json schema. (specifically included empty enum array) +- Fix env flag: it was being ignored and overriden with PROD in most places. +- Add `Summary:` syntax for summaries in swagger generated specs for operations +- Reword generated swagger descriptions for paginated APIs + ## 4.0.0 12/10/2020 Revert generated topic name format for compatibility with topic names generated by earlier versions of Reslang. diff --git a/package.json b/package.json index 51b8065b..0479e919 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@liveramp/reslang", - "version": "5.2.1", + "version": "6.2.1", "main": "index.js", "license": "Apache-2.0", "engines": { diff --git a/src/main.ts b/src/main.ts index 902f53be..658a6a4b 100755 --- a/src/main.ts +++ b/src/main.ts @@ -18,7 +18,7 @@ import JsonSchemaGen from "./genjsonschema" const RULES = "rules.json" const LOCAL_RULES = lpath.join(__dirname, "library", RULES) -export const VERSION = "v6.1.5" +export const VERSION = "v6.2.1" // parse the cmd line const args = yargs