This commit is contained in:
tidusjar 2016-05-23 17:22:22 +01:00
parent 748fe2ca2d
commit 7c41f448a8
14 changed files with 1066 additions and 79 deletions

View file

@ -24,7 +24,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// ************************************************************************/
#endregion
using System;
using Nancy.Swagger;
using Nancy.Swagger.Services;
@ -40,31 +39,34 @@ namespace PlexRequests.UI.ModelDataProviders
/// <returns></returns>
public SwaggerModelData GetModelData()
{
return SwaggerModelData.ForType<RequestedModel>(with =>
{
with.Property(x => x.Title)
.Description("The requests title e.g. Star Wars Episode III")
.Required(true);
with.Property(x => x.AdminNote).Description("A note left by the administrator");
with.Property(x => x.Approved).Description("true or false if the request is approved").Required(true).Default(false);
with.Property(x => x.ArtistId).Description("The artist ID (if this request is for Headphones then it is required)");
with.Property(x => x.ArtistName).Description("The artist name (if this request is for Headphones then it is required)");
with.Property(x => x.Available).Description("If the request is available on Plex").Default(false);
with.Property(x => x.CanApprove).Description("Ignore");
with.Property(x => x.ImdbId).Description("The IMDB id of the request").Required(true);
with.Property(x => x.Issues)
.Description(
"The issue type, None = 99, WrongAudio = 0, NoSubtitles = 1, WrongContent = 2, PlaybackIssues = 3, Other = 4. Use Other(4) when leaving an issue note");
with.Property(x => x.MusicBrainzId).Description("The MusicBrainz ID of the album request (if this request is for Headphones then it is required)");
with.Property(x => x.OtherMessage)
.Description("The issue message left by the user. The Issues property needs to be set to Other (4) for this to work correctly");
with.Property(x => x.PosterPath).Description("The poster path for the request").Required(true);
with.Property(x => x.ProviderId).Description("The TVMaze/TheMovieDB Id for the request depending if it's a movie request or Tv request").Required(true);
with.Property(x => x.ReleaseDate).Description("The release date of the request").Required(true);
with.Property(x => x.RequestedDate).Description("The date if the request, if this is not set, the request date will be set at the time of the Api call");
with.Property(x => x.RequestedUsers).Description("A collection of the requested users").Required(true);
with.Property(x => x.Type).Description("The type of request: Movie = 0, TvShow = 1, Album = 2").Required(true);
});
return SwaggerModelData.ForType<RequestedModel>(
with =>
{
with.Property(x => x.Title).Description("The requests title e.g. Star Wars Episode III").Required(true);
with.Property(x => x.AdminNote).Description("A note left by the administrator");
with.Property(x => x.Approved).Description("true or false if the request is approved").Required(true).Default(false);
with.Property(x => x.ArtistId).Description("The artist ID (if this request is for Headphones then it is required)");
with.Property(x => x.ArtistName).Description("The artist name (if this request is for Headphones then it is required)");
with.Property(x => x.Available).Description("If the request is available on Plex").Default(false);
with.Property(x => x.CanApprove).Description("Ignore");
with.Property(x => x.ImdbId).Description("The IMDB id of the request").Required(true);
with.Property(x => x.Issues)
.Description(
"The issue type, None = 99, WrongAudio = 0, NoSubtitles = 1, WrongContent = 2, PlaybackIssues = 3, Other = 4. Use Other(4) when leaving an issue note");
with.Property(x => x.MusicBrainzId).Description("The MusicBrainz ID of the album request (if this request is for Headphones then it is required)");
with.Property(x => x.OtherMessage)
.Description("The issue message left by the user. The Issues property needs to be set to Other (4) for this to work correctly");
with.Property(x => x.PosterPath).Description("The poster path for the request").Required(true);
with.Property(x => x.ProviderId)
.Description("The TVMaze/TheMovieDB Id for the request depending if it's a movie request or Tv request")
.Required(true);
with.Property(x => x.ReleaseDate).Description("The release date of the request").Required(true);
with.Property(x => x.RequestedDate)
.Description("The date if the request, if this is not set, the request date will be set at the time of the Api call");
with.Property(x => x.RequestedUsers).Description("A collection of the requested users").Required(true);
with.Property(x => x.Type).Description("The type of request: Movie = 0, TvShow = 1, Album = 2").Required(true);
with.Property(x => x.Id).Description("The request Id (Only use for deleting)");
});
}
}
}