Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Aspnetcore2.1] Missing tag closure of StringLength attribute #2275

Closed
sedainterxion opened this Issue Mar 1, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@sedainterxion
Copy link

sedainterxion commented Mar 1, 2019

Description

I have a parameter with min/max length attributes. When I run the generator, there is a missing tag closure of StringLength attribute.

public virtual async Task<List<Facility>> FacilitiesList([FromQuery][StringLength(3, MinimumLength=3)string area, [FromQuery]string addressCountry)

It can be seen in these resource files as well: https://github.com/OpenAPITools/openapi-generator/search?q=MinimumLength

openapi-generator version

3.0.2

OpenAPI declaration file content
  parameters:
    area:
      name: area
      required: false
      schema:
        type: string
        maxLength: 3
        minLength: 3
        example: "MOO"

@sedainterxion sedainterxion changed the title [BUG] [Aspnetcore2.1] Missing closure of StringLength attribute [BUG] [Aspnetcore2.1] Missing tag closure of StringLength attribute Mar 6, 2019

wing328 added a commit that referenced this issue Apr 15, 2019

Fix closing tag for attribute in aspnetcore gen - fixes #2275 (#2607)
* Fix closing tag for attribute in aspnetcore gen

"]" character at col 209

* remove newline
@sedainterxion

This comment has been minimized.

Copy link
Author

sedainterxion commented Apr 15, 2019

Hi @ingvirafn ,

It seems you only fixed one file (pathParam.mustache), but the same problem occurs in other files as well (queryParam, headerParam, formParam)

@wing328

This comment has been minimized.

Copy link
Member

wing328 commented Apr 15, 2019

@sedainterxion may I know if you've time to contribute a PR with the fix for other templates?

@wing328 wing328 added this to the 4.0.0 milestone Apr 15, 2019

@sedainterxion

This comment has been minimized.

Copy link
Author

sedainterxion commented Apr 15, 2019

@wing328 sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.