File tree Expand file tree Collapse file tree 4 files changed +32
-19
lines changed
Expand file tree Collapse file tree 4 files changed +32
-19
lines changed Original file line number Diff line number Diff line change 1+ const indent = ( text ) =>
2+ // add a star before each newline and the start of the string
3+ text . replace ( / ^ / gm, " * " ) ;
4+
5+ module . exports = indent ;
Original file line number Diff line number Diff line change 1- {{ #if description }}
21/**
3- * {{ description }}
2+ * {{ @key }}
3+ {{ #if description }} * {{ description }} {{ /if ~}}
4+ *
5+ {{ #each properties }}
6+ * @param { {{~ typeConvert this ~}} } {{ #if _required }} {{ @key }} {{ else }} [{{ @key }} ]{{ /if }} {{ #if description }} - {{ description }} {{ /if }}
7+ {{ /each }}
48 */
5- {{ /if }}
69export class {{ @key }} {
710
811 static propertyTypes: Array<{name: string, type: string}> = [
@@ -15,9 +18,6 @@ export class {{@key}} {
1518 ];
1619
1720 {{ #each properties }}
18- {{ #if description }}
19- // {{ description }}
20- {{ /if }}
2121 public {{ @key }} {{ #unless _required }} ?{{ /unless }} : {{ typeConvert this }} ;
2222 {{ /each }}
23- }
23+ }
Original file line number Diff line number Diff line change @@ -5,14 +5,12 @@ import { request } from "./request";
55import { Parameter, ParameterBuilder } from "./parameterBuilder";
66import { deserialize, serialize } from "./serializer";
77
8- /*
9- {{ _info.title }}
10- {{ info.description }}
11- Version: {{ info.version }}
12- */
13-
14- {{ #if _tag.description }} // {{ _tag.description }} {{ /if }}
15-
8+ /**
9+ * {{ _info.title }}
10+ *
11+ {{ #if info.description }} {{ docComment info.description }} {{ /if }}
12+ {{ #if info.version }} * @version {{ info.version }} {{ /if }}
13+ */
1614export default class Api{{ _tag.name }} {
1715 private config: Configuration;
1816
@@ -25,12 +23,20 @@ export default class Api{{_tag.name}} {
2523 {{ #each this }}
2624 {{ #ifEquals ../../_tag.name _tag.name}}
2725
28- {{ #if summary }} // {{ summary }} {{ /if }}
29- {{ #if description }} // {{ description }} {{ /if }}
30- {{ #if tags }} // tags: {{ tags }} {{ /if }}
26+ /**
27+ {{ #if summary }}
28+ * {{ summary }}
29+ *
30+ {{ /if }}
31+ {{ #if description }}
32+ * {{ description }}
33+ *
34+ {{ /if }}
35+ {{ #if tags }} * @tags {{ tags }} {{ /if }}
3136 {{ #each _sortedParameters }}
32- // @param {{ name }} {{ description }}
37+ * @param { {{~ typeConvert schema ../../../_options ~}} } {{ name }} {{ description }}
3338 {{ /each }}
39+ */
3440 async {{ operationId }} (
3541 {{ #each _sortedParameters }}
3642 {{ name }} {{ #if _optional }} ?{{ /if }} :
Original file line number Diff line number Diff line change 11{{ #each components.schemas }}
22{{> model }}
3+
34{{ /each }}
45
56{{ #each components.inlineObjects }}
67{{> model }}
8+
79{{ /each }}
810
911export const models: string[] = [
You can’t perform that action at this time.
0 commit comments