Swagger exposes by default any schema that is used by an exposed controller (API end point). How can a schema (class) be exposed if it is not used by a controller?
For example, Swagger is showing the following Schemas:
But, the Song Schema (below) needs to be exposed. It is not exposed because it is not used by a controller (API end point).
using System;
namespace ExampleNamespace
{
public class Song
{
[Key][Required]
public int SongID { get; set; }
[Required]
public string SongName { get; set; }
public string SongDescription { get; set; }
public int SongLength { get; set; } //seconds
[Required]
public int AlbumID { get; set; }
}
}
How can this be accomplished?