github.com/snyk/vervet/v6@v6.2.4/testdata/generators.yaml (about) 1 version-readme: 2 scope: version 3 filename: "{{ .Path }}/README" 4 template: ".vervet/resource/version/README.tmpl" 5 version-controller: 6 scope: version 7 files: |- 8 {{- $path := .Path -}} 9 {{- range $_, $pathItem := .ResourceVersion.Document.Paths -}} 10 {{- range $method, $operation := $pathItem|pathOperations -}} 11 {{- $operationId := $operation.OperationID -}} 12 {{- $ctx := map "Context" . "OperationId" $operationId }} 13 {{ $path }}/{{ $operationId }}.ts: |- 14 {{ include "contents" $ctx | indent 2 }} 15 {{ end }} 16 {{- end -}} 17 template: ".vervet/resource/version/controller.ts.tmpl" 18 version-index: 19 scope: version 20 filename: "{{ .Path }}/index.ts" 21 template: ".vervet/resource/version/index.ts.tmpl" 22 resource-routes: 23 scope: resource 24 filename: "{{ .Path }}/routes.ts" 25 template: ".vervet/resource/routes.ts.tmpl"