i want to add two Version to config.SwaggerDoc in services.AddSwaggerGen for implemet swagger

Advertisements I want to add two Versions to the config.SwaggerDoc in services.AddSwaggerGen to implement Swagger for example: services.AddSwaggerGen( config => { config.SwaggerDoc("v1.1", new OpenApiInfo { Title = "BookingApis V1", Version = "v1.1", Description = "Developed By Demon" }); config.SwaggerDoc("v2", new OpenApiInfo { Title = "BookingApis V2", Version = "v2", Description = "Developed By Demon" });… Read More i want to add two Version to config.SwaggerDoc in services.AddSwaggerGen for implemet swagger

Why isn't Swagger making API requests with the full route?

Advertisements When I Make a request using the swagger UI, it uses the wrong URL, but when I make the request on the browser and use http://localhost:8080/client/getRecord/?id=j9jSeEYJOjWWp6V5EHP0, it works just fine, since it has the "/client" route, and not on Swagger. For context, here is my index.js code: const express = require(‘express’); const app =… Read More Why isn't Swagger making API requests with the full route?

Where can I find the file swagger.json on my PC, referred to as "localhost"?

Advertisements I’m developping a C# application, based on Swagger GUI. When launching the application, my web browser goes to http://localhost:5128/index.html. On that "web page", there is a reference to a "swagger.json" file, located in "/swagger/v1/swagger.json", which corresponds with this line of source code: application.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Employee API V1"); … However, both windows search… Read More Where can I find the file swagger.json on my PC, referred to as "localhost"?

System.NotSupportedException: Serialization and deserialization of 'System.DateOnly' instances are not supported

Advertisements I am using .NET 6, ASP.NET Core Web API 6. db PostgreSQL 15. DROP TABLE IF EXISTS account_object; CREATE TABLE account_object ( id uuid DEFAULT uuid_generate_v4 () primary key, account_object_code character varying(64) unique not null, account_object_name character varying(512), gender smallint, birth_date date, birth_place character varying(256), agreement_salary numeric(10), salary_coefficient numeric(5, 2), number_of_dependent smallint, insurance_salary numeric(10),… Read More System.NotSupportedException: Serialization and deserialization of 'System.DateOnly' instances are not supported

JsonIgnore Not Work With Swagger When Using NewtonSoft

Advertisements net core 5, I stopped using System.text.Json for some reason and I use NewtonSoft and I changed all the namespaces, for example, to JsonIgnore, but my problem is that the properties that I ignored are still displayed in the swagger output. using System; using Newtonsoft.Json; public class AddEmployeeDto { public Guid Id { get;… Read More JsonIgnore Not Work With Swagger When Using NewtonSoft

How to send a POST request to Swagger API on a localhost with Python?

Advertisements I’m trying to send a post request to a Swagger API, which is currently on the localhost and keep getting various errors. The error I’m getting at the moment is: requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) The code I’m executing: import requests import json def create_bucket(): url = "http://127.0.0.1:3000/api/buckets" headers =… Read More How to send a POST request to Swagger API on a localhost with Python?

How can I propagate request headers to response headers in SpringBoot 2

Advertisements I have interfaces generated by Swagger Codegen. It looks like this: @PostMapping(value = "/ipc/conf", produces = {"application/json", "application/problem+json"}, consumes = { "application/json"}) default ResponseEntity<CustomResponseEntity> ipcConfPost( @ApiParam(value = "ID", required = true) @RequestHeader(value = "X-Request-ID", required = true) String xRequestID, @ApiParam(value = "Value for identifying a single transaction across multiple services up to the backend.",… Read More How can I propagate request headers to response headers in SpringBoot 2

Springfox Swagger 2 – Method paths(regex ("string")) does not work

Advertisements so I’m writing a Docket, but when i call the paths method, there is the error "The method regex(String) is undefined for the type SwaggerConfig". My swagger dependencies all have the same version (3.0.0) here is the code snippet I struggle with package de.tut.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket;… Read More Springfox Swagger 2 – Method paths(regex ("string")) does not work