Simple use of swagger2
Advantages:APIs in document form can be generated and provided to different teams.
Easy to test by yourself
This is very important because I have encountered such a situation at work that is caused by inconsistent development and use documents with the latest document versions, which makes it annoying in the future.
=== Use swagger process ===
1. Introduce pom dependency
2. Create a swagger2 configuration class
New Class
application pool to "unmanaged code" because just now, IIS is the role of a reverse proxy and does not need it to host code3, OK, done, browse our website.At this point my heart is broken, there is no useful information, it seems you can only see the application's running log.4. Set the logging mode for IIS to log files and ETW events5. Revisit the website, then open the Windows Application log and you will see a message like this. This means that your application has been started by the PID 32
application pool to "unmanaged code" because just now, IIS is the role of a reverse proxy and does not need it to host code3, OK, done, browse our website. At this point my heart is broken, there is no useful information, it seems you can only see the application's running log.4. Set the logging mode for IIS to log files and ETW events5. Revisit the website, then open the Windows Application log and you will see a message like this. This means that your application has been started by the PID 3
interaction is supported. HTTP notifications can be used, but the server must always send HTTP responses.• Because the client communicates directly with the server (no proxy or buffer mechanism), it must be online during the interaction.• The client must know the URL of each service instance. As mentioned in the previous article on API Gateway, this is also an annoying problem. The client must use the service instance discovery mechanism.The developer community has recently re-discovered the va
Recently, because of working relationships, I have been doing the development of node. js, learning the KOA Framework, ORM Framework Sequelize, and the configuration of swagger documents. However, because the swagger document uses a ES6 decorator (called Annotations in Java) recently, node. JS cannot compile the project, so you need to convert ES6 using Babel. Because this article is to write, how to config
interaction is supported. HTTP notifications can be used, but the server must always send HTTP responses.? Because the client communicates directly with the server (no proxy or buffer mechanism), it must be online during the interaction.? The client must know the URL of each service instance. As mentioned in the previous article on API Gateway, this is also an annoying problem. The client must use the service instance discovery mechanism.The developer community has recently re-discovered the va
() { fmt.Printf("hello, world\n") }
Execute the following command to compile the hello.go, and then generate the Hello.exe file in the bin directory in the Gopath directory after execution
Go Install Github.com/strawbird/hello
You can see the word Hello World on the console by executing the following command
%gopath%/bin/hello
Idea installs the Go language plugin
Choose Go to install the following, after the installation of the SDK c
-help-pagesSwashbuckle Help Page1. Add the Swashbuckle component to NuGet.Then you can browse the generated help page: Http://localhost:xxxx/swagger A list of methods for the Web API has been shown, but the description of the method is not yet displayed.2. Modify the configuration file generation locationRight-click the Project property to specify the output XML. Find SwaggerConfig.cs Remove the notes from the C.includexmlcomments (Getxmlcommentspa
the help page again, and the method description is consistent with the code comment. Note: This can be used to update the English entry of the corresponding page in area to Chinese, of course, the style can also be adjusted.4. Adding Test toolsAdd the test client component to NuGet. Add the following code to areas\helppage\views\help\api.cshtml:@Html. Displayformodel ("Testclientdialogs")@section Scripts {@Html. Displayformodel ("Testclientreferences")} Run the help page again, and one more
About the plug-in of the. net Core Project released on Linux,. netcoreThis article mainly records the issues that the. net Core project encountered when it was released on a Linux server to prevent forgetting
1. the following error is prompted when dotnet xxxxxx. dll is executed in the published file:
An assembly specified in the application dependencies manifest (xxx. deps. json) was not found:Package: 'swashbuckle. AspNetCore. Swagger ', version:
know o (> unknown
Therefore, a website that parses jwt information is very important online parsing jwt parameter http://jwt.calebb.net/
During the test, swagger is used to enable the swagger ui request to carry header information.Https://www.cnblogs.com/JacZhu/p/6188968.html
You can understand why UserId should be parsed in BaseController. I have found many articles at the beginning. None of them refer t
::. NET anti-compilation tool,
https://www.red-gate.com/products/dotnet-development/reflector/
https://www.jetbrains.com/decompiler/
http://ilspy.net/
Memprofiler: A powerful tool for finding memory leaks for optimized memory. http://memprofiler.com/
Postsharp: Remove duplicate code and avoid code bloat. Https://www.postsharp.net/download
Asphere: The GUI program for the Web. config editor. Http://www.asphere.cz/en/index.html
2.REST API
Use LaravelGenerator to quickly generate CRUD, API, and test case code for Laravel applications. This article describes how to create APIs and CRUD in many projects, the problem we are facing is that we need to create a bunch of migration files, model classes, controllers, Repository and even test cases each time. these files have the same structure, but the class names are different, we need to simplify this process and use a unified template to quickly generate these class files. Therefore, la
Using OData to speed up rest API development
Introducing the NuGet package: Microsoft.AspNet.WebApi.OData
Add the following configuration in the Startup class (examples are global, or can be implemented based on a controller or action):
Use Cors for cross-domain access:
Introducing the NuGet package: Microsoft.AspNet.WebApi.Cors
Add the following configuration in the Startup class (examples are global, or can be implemented based on a contro
_messageappservice; Public Messagecontroller (Imessageappservice messageappservice) {_messageappservice = Messageappservice; } [HttpGet] [Route ("{ID}")] public taskIt can be seen that the class is just a package of service, defines the API routing and parameter forms, the code is slightly cumbersome. The individual wants to be automatically generated by the ABP, as in previous versions, and is expected to be available in a future release.
Start DemoAppNow we are ready for the module needs
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.