swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[rust-server] typo: enum naming code was disabled

Open FauxFaux opened this issue 7 years ago • 0 comments

The value.replaceAll here needs to be var.replaceAll, or all of the previous processing of var is ignored. IntelliJ generates a warning (unused assignment) for this.

This breaks enums with empty values, as seen in docker's swagger.yaml:

  LocalNodeState:
    description: "Current local status of this node."
    type: "string"
    default: ""
    enum:
      - ""
      - "inactive"
      - "pending"
      - "active"
      - "error"
      - "locked"
    example: "active"

(It is, by far, not the only thing broken while processing Docker's .yaml.)

This enables a lot of code which was previously untested, only some of which is needed for this usecase. I choose to trust the original author that this code was supposed to be there, and was tested at some point.

FauxFaux avatar Jun 01 '18 20:06 FauxFaux