Commit Graph

16 Commits

Author SHA1 Message Date
Max K
5306372b98 Added Contact NAME to Startup.cs (#7168)
* Ran bin/aspnetcore-petstore-server.sh

* Added contact information to startup.cs

* updated to support NAME as well

* updated samples

* updated NAME default
2017-12-14 01:31:11 +08:00
Max K
5e4d363675 [AspnetCore Server] Added Original swagger (#7170)
* Updated Codegenerator as well as added new swagger-original mustache template

* updated Startup.cs template to provide guidance for original Swagger file

* Updated Sample
2017-12-14 00:57:16 +08:00
Max K
c496ec7269 Added support for VERSION, APPNAME and CONTACT from Swagger file into Startup.cs (#7103)
* Added support for VERSION and APPNAME from Swagger file into Startup.cs for Swashbuckle SwaggerGen

* Ran bin/aspnetcore-petstore-server.sh

* Added contact information

* Added contact information to startup.cs
2017-12-13 12:03:33 +08:00
Max K
1541d96b18 Updated SwaggerResponse Attributes so they use the actual dataType instead of the common returnType (#7096)
* Moved SwaggerResponse Attributes to use the respective dataType instead of the common returnType.

* Updated examples
2017-12-13 11:59:45 +08:00
Max K
9ca63955c2 Added support for Operation EXAMPLE value in ASP.NET Core Generator. (#7091)
* Added support for Operation EXAMPLE value in ASP.NET Core Generator.

* Updated PetStore samples
2017-12-13 00:13:13 +08:00
Max K
d881cb39bf Added Base Path support as well as PathParameterValidation (#7120)
* Ran bin/aspnetcore-petstore-server.sh

* Added BasePath filter and Validation filter

* Updated filters and added Attribute generators

* Removed newline

* Updated samples
2017-12-12 00:04:20 +08:00
Max K
e75523a684 [AspNetCore SERVER] Added support for ASP.NET Core 2.0 (#7114)
* Updated to .NET Core 2.0

* Fixed issue with IConfiguration vs. IConfigurationRoot

* Ran bin/aspnetcore-petstore-server.sh

* Updated to .NET Core 2.0

* Fixed issue with IConfiguration vs. IConfigurationRoot

* Ran bin/aspnetcore-petstore-server.sh
2017-12-06 11:02:13 +08:00
Max K
645d71ed3b Operation now returns StatusCode Stubs as well (#7098)
* Operation now returns StatusCode Stubs as well

* Updated mustache file to use comments

return StatusCode(..) is now commented out.

* Change default(..) to not escape the type

default(dataType) --> default(&dataType)

* Return IActionResult no matter what..

* Updated formatting

* Ran bin/aspnetcore-petstore-server.sh
2017-12-05 22:14:00 +08:00
wing328
443b0f142b remove ref to SO (#6209) 2017-07-29 18:53:08 +08:00
wing328
fee54157c0 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-15 17:14:39 +08:00
Paŭlo Ebermann
4b9988c4f2 Update samples for several language (just whitespace changes, reordering, VERSION) (#5828)
* Update samples for several languages.

Just whitespace changes and some reordering where the order doesn't matter.

* Adding generated .swagger-codegen/VERSION files.
2017-06-14 01:17:31 +08:00
Sebastian Mandrean
7cc20cbeba [C#][aspnetcore] Improve generated code (#5257)
* Migrate from Swashbuckle to Swashbuckle.AspNetCore

* Fix typo

* Add SwaggerResponse for all responses

* Remove model constructor

* Add required attribute if available

* Improve whitespace and remove some redundant code

* Remove redundant code from Dockerfile

* Add disable warning 1591 pragma for model utility methods for bringing down compiler warnings to zero

* Add proper model state validation before controller is called

* Regenerate AspNetCore PetStore sample
2017-03-30 22:58:25 +08:00
Sebastian Mandrean
58198939c7 [C#][aspnetcore] Fix broken Docker build option & documentation (#5128)
* Use lower-case packageName for README.md docker build example

* Use dotnet:1.0.3-sdk instead of just "latest"

* Regenerate Petstore server sample
2017-03-21 14:39:24 +08:00
Jim Schubert
da6b57f3fc [aspnetcore] use default in model constructors, supports enums (#4573)
* [aspnetcore] Use default rather than null in ctor

See original issue #3608

This adds same model constructor logic to aspnetcore as what was added
to csharp generator by PR #4145.

This doesn't include NancyFX because model construction relies more on
object initialization in that generator.

* [aspnetcore] ctor defaults + enum support

This follows up to #4145, and modifies model constructors to use
default(x) instead of initializing to nulls. default(x) works in all
cases using intuitive default values it is intended to support.

Example:

  csharp> public enum Color { RED = -1, BLUE = 0, GREEN }
  csharp> var color = default(Color)
  csharp> color
  BLUE

In the above example, The default of BLUE=0 is expected. For nullable
enums, this would be null as a default.

The aspnetcore generated code is also updated to support enums and
nested enums to account for changed to the petstore.yaml used to
generate the sample.

* [aspnetcore] Regenerate sample
2017-01-18 16:43:12 +08:00
wing328
88227e08e3 Remove Apache license from server stub generators (#4200)
* remove php apache license

* remove license in sample code, update nodejs to use unlicnese

* remove license from jaxrs generator

* remove license from server generator

* update pom.xml for jaxrs resteasy joda server
2016-11-17 00:37:21 +08:00
Jim Schubert
c70a2a7481 [aspnetcore] Deprecating aspnet5 for aspnetcore
This moves previous aspnet5 functionality to aspnetcore, aspnet5 now
derives from the aspnetcore generator and logs a warning that it's
deprecated.

This will help resolve any confusion because ASP.NET 5 is terminology
referring to the project of around a year ago. ASP.NET Core 1.0 is the
new name for the technology, and further enhancements should target .NET
Core 1.0 rather than any old vNext or preview stuff.
2016-10-16 21:22:34 -04:00