Skip to content

Datasync Server Sample does not generate correct swagger.json when using OpenApi driver #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
adrianhall opened this issue Mar 10, 2025 · 0 comments
Assignees
Labels
Examples Server Improvements or additions to the server code
Milestone

Comments

@adrianhall
Copy link
Collaborator

Describe the bug

When using the Sample.Datasync.Server and setting the swagger generator to net9, the following swagger document is generated:

{
  "openapi": "3.0.1",
  "info": {
    "title": "Sample.Datasync.Server | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://localhost:5001"
    }
  ],
  "paths": { },
  "components": { }
}

This is obviously wrong.

To Reproduce

Steps to reproduce the behavior:

  1. Open the Sample.Datasync.Server solution
  2. Press F5
  3. Point browser at https://localhost:5001/swagger/v1/swagger/json

Expected behavior

I'd expect a correct swagger document to be displayed.

What platforms?

  • Server:
    • Version of dotnet being used to compile? 9.0.2
    • Library versions?
      • CommunityToolkit.Datasync.Server v9.0.1
      • EntityFrameworkCore v9.0.2
    • What database are you using?
      • SQL LocalDB
    • Where are you running the server?
      • Locally
@adrianhall adrianhall added Examples Server Improvements or additions to the server code labels Mar 10, 2025
@adrianhall adrianhall added this to the 9.0.2 milestone Mar 10, 2025
@adrianhall adrianhall self-assigned this Mar 10, 2025
@adrianhall adrianhall modified the milestones: 9.0.2, 9.0.3 Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Examples Server Improvements or additions to the server code
Projects
None yet
Development

No branches or pull requests

1 participant