Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from DFE-Digital/feature/academies-api-contracts
Browse files Browse the repository at this point in the history
Feature/academies api contracts
  • Loading branch information
paullocknimble authored Nov 7, 2023
2 parents 19ef94a + 7125870 commit 63bff39
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/DFE-Digital/academisation-nuget-packages</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace Dfe.Academies.Contracts.V4;
using System.Collections.Generic;

public class PagedDataResponse<TResponse> where TResponse : class
{

public IEnumerable<TResponse> Data { get; set; }
public PagingResponse Paging { get; set; }

public PagedDataResponse() => Data = new List<TResponse>();

public PagedDataResponse(IEnumerable<TResponse> data, PagingResponse pagingResponse)
{
Data = data;
Paging = pagingResponse;
}

public PagedDataResponse(TResponse data) => Data = new List<TResponse> { data };

}
public class PagingResponse
{
public int Page { get; set; }
public int RecordCount { get; set; }
public string NextPageUrl { get; set; }

Check warning on line 25 in academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'NextPageUrl' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}
File renamed without changes.

0 comments on commit 63bff39

Please sign in to comment.