swagger-api / swagger-api/swagger-codegen
Errors generated .net server code
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
From @stevenbaylor on February 13, 2019 14:52
- OS: Windows 10
- Browser: Chrome
- Version: 72.0.3626.96 (Official Build) (64-bit)
- Method of installation: online editor
- Swagger-Editor version: online
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Example Swagger/OpenAPI definition:
https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml
Describe the bug you're encountering
The "aspnetcore" server code does not build. Seems to have missing path separators in build.bat and IO.Swagger.sln
To reproduce...
- Browse to https://editor.swagger.io
- File -> Import URL: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml
- Generate Server -> aspnetcore
- Save zip file
- Extract zip file
- Launch build.bat
Output:
PS C:\Users\Steve\Documents\swagger\dotnet_codegen_test\aspnetcore-server-generated> .\build.bat
MSBUILD : error MSB1009: Project file does not exist.
Switch: srcIO.Swagger
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: srcIO.Swagger
Now, run the following to start the project: dotnet run -p srcIO.SwaggerIO.Swagger.csproj --launch-profile web.
PS C:\Users\Steve\Documents\swagger\dotnet_codegen_test\aspnetcore-server-generated>
Expected behavior
Successful build
Additional context or thoughts
Path separators (\) seem to be missing in:
- build.bat - lines 6,7,8
- IO.Swagger.sln - line 5
Copied from original issue: swagger-api/swagger-editor#1949
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report by importing the petstore.yaml example in Swagger Editor, generating the aspnetcore server, and running build.bat on Windows. Inspect build.bat lines 6–8 and IO.Swagger.sln line 5; done means the generated project builds successfully and the displayed dotnet run command uses valid paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100