|
19 | 19 | */
|
20 | 20 | public class LineBotSdkNodejsGeneratorGeneratorTest {
|
21 | 21 |
|
22 |
| - // use this test to launch you code generator in the debugger. |
23 |
| - // this allows you to easily set break points in MyclientcodegenGenerator. |
24 |
| - @Test |
25 |
| - public void launchCodeGenerator() { |
26 |
| - // to understand how the 'openapi-generator-cli' module is using 'CodegenConfigurator', have a look at the 'Generate' class: |
27 |
| - // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java |
28 |
| - final CodegenConfigurator configurator = new CodegenConfigurator() |
29 |
| - .setGeneratorName("line-bot-sdk-nodejs-generator") // use this codegen library |
30 |
| - .setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // sample OpenAPI file |
31 |
| - // .setInputSpec("https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server |
32 |
| - .setOutputDir("out/line-bot-sdk-nodejs-generator"); // output directory |
| 22 | + // use this test to launch you code generator in the debugger. |
| 23 | + // this allows you to easily set break points in MyclientcodegenGenerator. |
| 24 | + @Test |
| 25 | + public void launchCodeGenerator() { |
| 26 | + // to understand how the 'openapi-generator-cli' module is using 'CodegenConfigurator', have a look at the 'Generate' class: |
| 27 | + // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java |
| 28 | + final CodegenConfigurator configurator = new CodegenConfigurator() |
| 29 | + .setGeneratorName("line-bot-sdk-nodejs-generator") // use this codegen library |
| 30 | + .setInputSpec("../line-openapi/shop.yml") // sample OpenAPI file |
| 31 | + // .setInputSpec("https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server |
| 32 | + .setOutputDir("out/line-bot-sdk-nodejs-generator"); // output directory |
33 | 33 |
|
34 |
| - final ClientOptInput clientOptInput = configurator.toClientOptInput(); |
35 |
| - DefaultGenerator generator = new DefaultGenerator(); |
36 |
| - generator.opts(clientOptInput).generate(); |
37 |
| - } |
| 34 | + final ClientOptInput clientOptInput = configurator.toClientOptInput(); |
| 35 | + DefaultGenerator generator = new DefaultGenerator(); |
| 36 | + generator.opts(clientOptInput).generate(); |
| 37 | + } |
38 | 38 |
|
39 | 39 | @Test
|
40 | 40 | public void pathReplacer() {
|
41 |
| - String s = LineBotSdkNodejsGeneratorGenerator.pathReplacer("/foo/{bar}/baz/{boz}"); |
42 |
| - assertEquals(".replace(\"{bar}\", String(bar)).replace(\"{boz}\", String(boz))", s); |
| 41 | + String s = LineBotSdkNodejsGeneratorGenerator.pathReplacer("/foo/{bar}/baz/{boz}"); |
| 42 | + assertEquals(".replace(\"{bar}\", String(bar)).replace(\"{boz}\", String(boz))", s); |
43 | 43 | }
|
44 | 44 | }
|
0 commit comments