Datagsm.OpenApi is an official .NET SDK for the DataGSM OpenAPI — a data platform for Gwangju Software Meister High School (GSM). It is published as a NuGet package and provides typed access to student, club, project, and NEIS (school meal/schedule) data.
- NuGet package ID:
Datagsm.OpenApi - Target framework:
net8.0 - Current version tracked in
Datagsm.OpenApi.csproj
datagsm_openapi/
├── Datagsm.OpenApi/
│ ├── Clients/ # API client implementations
│ ├── Models/ # DTOs, request/response models, enums
│ │ ├── Student/
│ │ ├── Club/
│ │ ├── Project/
│ │ ├── Neis/
│ │ ├── Shared/ # PersonDto, ClubInfo, ApiResponse<T>
│ │ └── Enums/
│ ├── Exceptions/ # Custom exception hierarchy
│ ├── DataGsmClient.cs # Main SDK entry point (sealed)
│ ├── DataGsmClientOptions.cs
│ └── Datagsm.OpenApi.csproj
└── datagsm_openapi.sln
# Build
dotnet build
# Pack for NuGet
dotnet pack -c Release
# Release is automated via CI/CD on git tag push (v*)
# See: .github/workflows/publish.ymlThere are no test projects. Changes are validated manually.
DataGsmClient is a sealed class that composes four specialized clients:
var client = new DataGsmClient("your-api-key");
client.Students // StudentClient
client.Clubs // ClubClient
client.Projects // ProjectClient
client.Neis // NeisClient (GetMealsAsync, GetSchedulesAsync)All clients extend BaseClient, which provides:
GetAsync<T>(path, queryParams, cancellationToken)— core HTTP GETToApiString<T>(enum)— converts enum values to snake_case_upper API strings- HTTP error → typed exception mapping
Client methods follow this signature:
public Task<XxxResponse> GetXxxAsync(XxxRequest? request = null, CancellationToken cancellationToken = default)Each resource has three files:
| Suffix | Purpose | Mutability |
|---|---|---|
*Request |
Query parameters / filters | Mutable (set) |
*Response |
Paginated response wrapper | Immutable (init) |
*Dto |
Data transfer object | Immutable (init) |
Uses System.Text.Json with:
- Case-insensitive property matching
SnakeCaseUppernaming policy for enum serialization (e.g.,MajorClub→MAJOR_CLUB)- No external serialization libraries
DataGsmException (base)
├── BadRequestException (400)
├── UnauthorizedException (401)
├── ForbiddenException (403)
├── RateLimitException (429)
└── ServerErrorException (500)
- All public types: PascalCase
- Async methods: suffix with
Async, returnTask<T> - DTOs and Responses: immutable via
initaccessors; default string values use= string.Empty - Enums: defined in
Models/Enums/; serialized asSNAKE_CASE_UPPER - Nullable reference types: enabled — avoid
null!suppressions without justification - No external NuGet dependencies — use only .NET built-in libraries
- Clients are sealed — do not make them inheritable unless there is a clear reason
- XML documentation: write in Korean to match existing style
The SDK uses the X-API-KEY HTTP header. API keys are obtained from the DataGSM portal and expire every 30 days.
- Create
Models/<Resource>/with<Resource>Dto.cs,<Resource>Request.cs,<Resource>Response.cs - Add any needed enums to
Models/Enums/ - Create
Clients/<Resource>Client.csextendingBaseClient - Expose the new client as a property on
DataGsmClient - Update
README.mdwith a usage example