Conversation
Member
Author
|
@copilot replace the |
Contributor
|
@gunndabad I've opened a new pull request, #3180, to work on those changes. Once the pull request is ready, I'll request review from you. |
4 tasks
Completes the Swashbuckle removal by replacing remaining Swashbuckle
annotation attributes in API controllers and request models with native
ASP.NET Core equivalents.
### Changes
- **`[SwaggerOperation]`** → `[EndpointName]`, `[EndpointSummary]`,
`[EndpointDescription]` on all action methods across V1, V2, and V3
controllers
- **`[SwaggerParameter]`** → `[Description]` (`System.ComponentModel`)
on action method parameters
- **`[SwaggerSchema]`** → `[Description]` (`System.ComponentModel`) on
request model properties
### Before / After
```csharp
// Before
[SwaggerOperation(
OperationId = "GetIttProviders",
Summary = "Get ITT Providers",
Description = "Gets the list of ITT providers")]
// After
[EndpointName("GetIttProviders"),
EndpointSummary("Get ITT Providers"),
EndpointDescription("Gets the list of ITT providers")]
```
### Guidance to review
34 files changed; all are mechanical attribute substitutions. No logic
changes.
### Checklist
- [ ] Attach to Trello card
- [ ] Rebased master
- [ ] Cleaned commit history
- [ ] Tested by running locally
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/DFE-Digital/teaching-record-system/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces Swashbuckle with Microsoft.AspNetCore.OpenApi and Scalar for a UI.
This also uses the new-ish
webhookselement of OpenAPI for defining our webhook messages.There are a few places where schema generation is broken (
Option<T>,OneOf<T1, T2>etc.) - I'll deal with these separately; they're somewhat broken today any way.I've also added redirects from the API root to the UI, since folks aren't discovering the docs at
/swagger, even though it is called out in the docs.