Skip to content

[Typescript-Angular]CodegenOperation not getting correct isRestfulXXX properties #6560

@Coke25

Description

@Coke25
Description
I'm trying to generate files by creating custom templates and updating TypeScriptAngularClientCodegen.java
On my custom template mustache file, I have code like:
{{#operations}}{{#operation}}
{{#isRestfulCreate}}Create{{/isRestfulCreate}}
{{#isRestfulUpdate}}Update{{/isRestfulUpdate}}
{{#isRestfulDestroy}}Delete{{/isRestfulDestroy}}
{{#isRestfulShow}}Show{{/isRestfulShow}}
{{#isRestfulIndex}}Index{{/isRestfulIndex}}
{{/operation}}
{{/operations}}
And this is used as apiTemplateFile:
        apiTemplateFiles.put("myCustomTemplate.mustache",".component.ts");
I'm using http://petstore.swagger.io/v2/swagger.json PetApi as my spec.
I only got "Create" generated.
And by debugging operations, some of the operations don't have correct properties
i.e. getPetById or deletePet have below properties
  "isRestfulIndex" : false,
          "isRestfulShow" : false,
          "isRestfulCreate" : false,
          "isRestfulUpdate" : false,
          "isRestfulDestroy" : false,
          "isRestful" : false
Swagger-codegen version
2.2.3
Swagger declaration file content or url
http://petstore.swagger.io/v2/swagger.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions