swagger-api / swagger-api/swagger-codegen

Strange characters at the beginning of aspnetcore and aspnet5 project files & Solutions will not load

Open
#4,418 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: C-Sharp
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

When generating the petstore example for aspnetcore and aspnet5 languages the project file (IO.Swagger.xproj) have strange characters at the beginning of the file making them invalid. These are the characters that appear every time: . However, even after removing these characters the project still can't load in Microsoft Visual Studio 2017 RC. The following error message appears:

Screenshot of unselectable text

Swagger-codegen version

master branch 2.2.1

Swagger declaration file content or url

The petstore example that ships with the codebase.

Command line used for generation

java -jar .\swagger-codegen-cli.jar generate -i .\petstore.yaml -l aspnet5 -o backend-aspnet5

Steps to reproduce

Just generate aspnetcore or aspnet5 with the petstore.yaml

Related issues
Suggest a Fix

We should start by investigating the strange characters at the beginning of the file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the shown swagger-codegen command with petstore.yaml for aspnet5 and aspnetcore, then inspect the generated IO.Swagger.xproj files. Trace the generation path that writes these project files; done means the strange characters are absent and the generated projects load in Microsoft Visual Studio 2017 RC.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, java
Domain
backend, build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.