public IEnumerable <SwaggerExample <PersonRequest> > GetExamples() { yield return(SwaggerExample.Create("Dave", "Posts Dave", "Here's a description", new PersonRequest { FirstName = "Dave", Title = Title.Mr })); yield return(SwaggerExample.Create("Angela", "Let's add Angela", new PersonRequest { FirstName = "Angela", Title = Title.Dr })); yield return(SwaggerExample.Create("Diane", "Diane is also fine to post", new PersonRequest { FirstName = "Diane", Title = Title.Mrs, Age = 30 })); yield return(SwaggerExample.Create("Michael", "And the last example", new PersonRequest { FirstName = "Michael", Income = 321.7m })); }
public IEnumerable <SwaggerExample <ApplicantAddRequestModel> > GetExamples() { yield return(SwaggerExample.Create("Petros", new ApplicantAddRequestModel() { Name = "Petros", FamilyName = "Ohanyan", CountryOfOrigin = "Armenia", Age = 28, Address = "Armenia, Yerevan", EMailAddress = "*****@*****.**" })); yield return(SwaggerExample.Create("Andrew", new ApplicantAddRequestModel() { Name = "Andrew", FamilyName = "Robertson", CountryOfOrigin = "United Kingdom of Great Britain and Northern Ireland", Age = 30, Address = "Scotland, Glasgow", EMailAddress = "*****@*****.**", Hired = true })); yield return(SwaggerExample.Create(_localizer[SwaggerExampleNames.NotValidExample], new ApplicantAddRequestModel() { Name = "Short", FamilyName = "Surname", CountryOfOrigin = "Neverland", Age = 19, Address = "short name", EMailAddress = "invalid_email.am", Hired = true })); }
public IEnumerable <SwaggerExample <MakeMerchantDepositRequest> > GetExamples() { SwaggerExample <MakeMerchantDepositRequest> manualDeposit = new SwaggerExample <MakeMerchantDepositRequest> { Name = "Manual Merchant Deposit", Value = new MakeMerchantDepositRequest { Amount = ExampleData.DepositAmount, DepositDateTime = ExampleData.DepositDateTime, Reference = ExampleData.DepositReference, Source = ExampleData.MerchantDepositSourceManual } }; SwaggerExample <MakeMerchantDepositRequest> automaticDeposit = new SwaggerExample <MakeMerchantDepositRequest> { Name = "Automatic Merchant Deposit", Value = new MakeMerchantDepositRequest { Amount = ExampleData.DepositAmount, DepositDateTime = ExampleData.DepositDateTime, Reference = ExampleData.DepositReference, Source = ExampleData.MerchantDepositSourceAutomatic } }; return(new List <SwaggerExample <MakeMerchantDepositRequest> > { manualDeposit, automaticDeposit }); }
public IEnumerable <SwaggerExample <AssetDto> > GetExamples() { yield return(SwaggerExample.Create("Post Test", new AssetDto { AssetName = "A old door", Department = 4, CountryOfDepartment = "France", EmailAddressOfDepartment = "*****@*****.**", PurchaseDate = new DateTime(2020, 5, 20, 8, 42, 0, DateTimeKind.Utc), Broken = true })); yield return(SwaggerExample.Create("Put Test", new AssetDto { Id = 2, AssetName = "My Pro Phone", Department = 2, CountryOfDepartment = "Italy", EmailAddressOfDepartment = "*****@*****.**", PurchaseDate = new DateTime(2020, 10, 20, 8, 42, 0, DateTimeKind.Utc), Broken = false })); }
public IEnumerable <SwaggerExample <DividendCalendarRequest> > GetExamples() { yield return(SwaggerExample.Create("Month", new DividendCalendarRequest() { From = DateTime.Now, To = DateTime.Now.AddDays(30) })); yield return(SwaggerExample.Create("2 Month", new DividendCalendarRequest() { From = DateTime.Now, To = DateTime.Now.AddDays(60) })); yield return(SwaggerExample.Create("3 Month", new DividendCalendarRequest() { From = DateTime.Now, To = DateTime.Now.AddDays(90) })); yield return(SwaggerExample.Create("Month with past 2 weeks", new DividendCalendarRequest() { From = DateTime.Now.AddDays(-14), To = DateTime.Now.AddDays(30) })); }
public IEnumerable<SwaggerExample<PersonRequest>> GetExamples() { yield return SwaggerExample.Create("Dave", "Posts Dave", new PersonRequest {FirstName = "Dave", Title = Title.Mr}); yield return SwaggerExample.Create("Dave", "Posts other Dave", new PersonRequest {FirstName = "Dave", Title = Title.Dr}); }
public IEnumerable <SwaggerExample <Coordinate> > GetExamples() { var examples = new SwaggerExample <Coordinate>(); examples.Name = "From London"; examples.Value = new Coordinate(-0.188142, 51.533007); yield return(examples); throw new System.NotImplementedException(); }
public IEnumerable <SwaggerExample <PersonResponse> > GetExamples() { yield return(SwaggerExample.Create("Dave", "Posts Dave", new PersonResponse { FirstName = "Dave", Title = Title.Mr })); yield return(SwaggerExample.Create("Angela", "Posts Angela", new PersonResponse { FirstName = "Angela", Title = Title.Dr })); }
public IEnumerable <SwaggerExample <DCFRequest> > GetExamples() { yield return(SwaggerExample.Create("Tech", new DCFRequest() { DividendMoreThan = 0, MarketCapMoreThan = 1000000, Sector = "Technology", VolumeMoreThan = 100000 })); yield return(SwaggerExample.Create("All", new DCFRequest() { DividendMoreThan = 0, MarketCapMoreThan = 1000000, VolumeMoreThan = 100000 })); }
public IEnumerable <SwaggerExample <MerchantBalanceHistoryResponse> > GetExamples() { var balanceHistoryIn = new SwaggerExample <MerchantBalanceHistoryResponse> { Name = "Merchant Balance In", Value = new MerchantBalanceHistoryResponse { EstateId = ExampleData.EstateId, MerchantId = ExampleData.MerchantId, Balance = ExampleData.Balance, Reference = ExampleData.BalanceHistoryReference, ChangeAmount = ExampleData.BalanceHistoryChangeAmount, EntryDateTime = ExampleData.BalanceHistoryEntryDateTime, EntryType = ExampleData.BalanceHistoryEntryTypeCredit, EventId = ExampleData.EventId, In = ExampleData.BalanceHistoryChangeAmount, Out = null, TransactionId = ExampleData.BalanceHistoryTransactionId } }; var balanceHistoryOut = new SwaggerExample <MerchantBalanceHistoryResponse> { Name = "Merchant Balance Out", Value = new MerchantBalanceHistoryResponse { EstateId = ExampleData.EstateId, MerchantId = ExampleData.MerchantId, Balance = ExampleData.Balance, Reference = ExampleData.BalanceHistoryReference, ChangeAmount = ExampleData.BalanceHistoryChangeAmount, EntryDateTime = ExampleData.BalanceHistoryEntryDateTime, EntryType = ExampleData.BalanceHistoryEntryTypeDebit, EventId = ExampleData.EventId, In = null, Out = ExampleData.BalanceHistoryChangeAmount, TransactionId = ExampleData.BalanceHistoryTransactionId } }; return(new List <SwaggerExample <MerchantBalanceHistoryResponse> > { balanceHistoryIn, balanceHistoryOut }); }
public IEnumerable <SwaggerExample <ApplicantUpdateRequestModel> > GetExamples() { yield return(SwaggerExample.Create(_localizer[SwaggerExampleNames.NameAndAge], new ApplicantUpdateRequestModel() { Name = "Javi", Age = 20 })); yield return(SwaggerExample.Create(_localizer[SwaggerExampleNames.CountryAndEmail], new ApplicantUpdateRequestModel() { CountryOfOrigin = "Colombia", EMailAddress = "colombia_tex@some_domain.cl" })); yield return(SwaggerExample.Create(_localizer[SwaggerExampleNames.InvalidUpdate], new ApplicantUpdateRequestModel() { Age = 61, Address = "here" })); }
public IEnumerable <SwaggerExample <CalendarRequest> > GetExamples() { yield return(SwaggerExample.Create("Next 10 days", new CalendarRequest() { From = DateTime.Now, To = DateTime.Now.AddDays(10) })); yield return(SwaggerExample.Create("Past 10 days", new CalendarRequest() { From = DateTime.Now.AddDays(-10), To = DateTime.Now })); yield return(SwaggerExample.Create("Past 3 months", new CalendarRequest() { From = DateTime.Now.AddDays(-100), To = DateTime.Now })); }
public IEnumerable <SwaggerExample <StrategyRequest> > GetExamples() { yield return(SwaggerExample.Create("Tech", new StrategyRequest() { Dividend = 0, MarketCapMoreThan = 1000000, Sector = "Technology", VolumeMoreThan = 100000, From = DateTime.Now.AddDays(-20), To = DateTime.Now })); yield return(SwaggerExample.Create("All", new StrategyRequest() { Dividend = 0, MarketCapMoreThan = 1000000, Sector = null, VolumeMoreThan = 100000, From = DateTime.Now.AddDays(-20), To = DateTime.Now })); }
public IEnumerable <SwaggerExample <PersonRequest> > GetExamples() { yield return(SwaggerExample.Create("Dave", "Posts Dave", "This description is rendered as _Markdown_ by *SwaggerUI*", new PersonRequest { FirstName = "Dave", Title = Title.Mr })); yield return(SwaggerExample.Create("Angela", "Let's add Angela", @" ## Markdown rules! This is a realy great feature for longer descriptions. ", new PersonRequest { FirstName = "Angela", Title = Title.Dr })); yield return(SwaggerExample.Create("Diane", "Diane is also fine to post", @" - enummerations - are - also - supported ", new PersonRequest { FirstName = "Diane", Title = Title.Mrs, Age = 30 })); yield return(SwaggerExample.Create("Michael", "And the last example", // not specifying a description is fine too new PersonRequest { FirstName = "Michael", Income = 321.7m })); }
/// <summary> /// Gets the examples. /// </summary> /// <returns></returns> public IEnumerable <SwaggerExample <IssueVoucherRequest> > GetExamples() { SwaggerExample <IssueVoucherRequest> voucherIssueToEmail = new SwaggerExample <IssueVoucherRequest> { Name = "Issue Voucher to Email Address", Value = new IssueVoucherRequest { EstateId = ExampleData.EstateId, IssuedDateTime = ExampleData.IssuedDateTime, OperatorIdentifier = ExampleData.OperatorIdentifier, RecipientEmail = ExampleData.RecipientEmail, TransactionId = ExampleData.TransactionId, Value = ExampleData.VoucherValue } }; SwaggerExample <IssueVoucherRequest> voucherIssueToMobile = new SwaggerExample <IssueVoucherRequest> { Name = "Issue Voucher to Mobile Number", Value = new IssueVoucherRequest { EstateId = ExampleData.EstateId, IssuedDateTime = ExampleData.IssuedDateTime, OperatorIdentifier = ExampleData.OperatorIdentifier, RecipientMobile = ExampleData.RecipientMobile, TransactionId = ExampleData.TransactionId, Value = ExampleData.VoucherValue } }; return(new List <SwaggerExample <IssueVoucherRequest> > { voucherIssueToEmail, voucherIssueToMobile }); }