Show / Hide Table of Contents

Class SwaggerExtensions

Adds some extensions methods related to the Swagger functionality.

Inheritance
System.Object
SwaggerExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Celerik.NetCore.Web
Assembly: cs.temp.dll.dll
Syntax
public static class SwaggerExtensions

Methods

GetSwaggerConfig(IConfiguration)

Gets the Swagger configuration stored into the passed-in IConfiguration object.

By convention, Swagger configuration properties are get from the IConfiguration object in the following way:

  • IsEnabled: Swagger:IsEnabled
  • ApiVersion: Swagger:ApiVersion
  • ApiName: Swagger:ApiName
  • JsonEndpoint: Swagger:JsonEndpoint
Declaration
public static SwaggerConfig GetSwaggerConfig(this IConfiguration config)
Parameters
Type Name Description
IConfiguration config

The configuration object where we get the Swagger configuration.

Returns
Type Description
SwaggerConfig

Swagger configuration stored into the passed-in IConfiguration object.

In This Article
Back to top Generated by DocFX