Display and test openapi.yaml file β€” CoPilot Blog
    Neura MarketNeura Market/CoPilot
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityCoPilotCoPilot
    DeepSeekDeepSeekStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityPluginsTrendingGenerate
    CoPilotBlogDisplay and test openapi.yaml file
    Back to Blog
    Display and test openapi.yaml file
    api

    Display and test openapi.yaml file

    Gabriel Weidmann April 16, 2026
    0 views

    From a partner company I got a openapi.yaml file to evaluate their api for our use cases. Mostly I...

    From a partner company I got a `openapi.yaml` file to evaluate their api for our use cases. Mostly I know those files from working with ASP.NET Core Apis + Swagger UI, but this time it was just a standalone file. I got the file and an api key for the sandbox. ## Did not work: Use via ASP.NET Core swagger The first thing I was trying was to use the already known swagger ui as it's the same format. So: 1. Setting up a new ASP.NET Core Api project in Visual Studio 2. Including the latest `Swashbuckle.AspNetCore` nuget 3. Putting the `openapi.yaml` file in the `wwwroot` folder 4. Setting up the Program.cs ```cs var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); app.UseHttpsRedirection(); // Allow to serve the unknown-by-default file type .yaml var provider = new FileExtensionContentTypeProvider(); provider.Mappings[".yaml"] = "application/yaml"; app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = provider, }); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/openapi.yaml", "Imported API"); c.RoutePrefix = "swagger"; }); app.Run(); ``` 5. Accessing the api via https://localhost:7298/swagger This worked almost, but then CORS came around :-( > Access to fetch at 'https://sandbox.***.com/api/...' from origin 'https://localhost:7298' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. The problem seems to be the browser, so let's look for a non-browser-solution. ## Did work: Import in Postman Then I noticed that Postman got the functionality to import openapi spec files: ![Importing openapi spec in Postman](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fijwq064bnakgpkrtmii.png) From here it's possible to simulate the api requests just as good (or better?) as in swagger UI.

    Tags

    apiopenapitest

    Comments

    More Blog

    View all
    Minimalist EKS: The Easy Waykubernetes

    Minimalist EKS: The Easy Way

    Amazon EKS manages the Kubernetes control plane, but you remain responsible for provisioning the...

    J
    Joaquin Menchaca
    Never forget to enter the Stern Grove lottery again!ai

    Never forget to enter the Stern Grove lottery again!

    Browser automation with Playwright, Python, GitHub Actions, and Entire to auto-enter San Francisco Stern Grove concert lotteries each week!

    L
    Lizzie Siegle
    A Free Screenshot Editor That Never Uploads Your Imagetypescript

    A Free Screenshot Editor That Never Uploads Your Image

    A free screenshot and image editor that runs entirely in your browser. Keeping every edit reversible and handling big phone photos, in plain TypeScript and Canvas2D.

    M
    Martin Stark
    I built a CLI to break my highlights out of Apple Booksshowdev

    I built a CLI to break my highlights out of Apple Books

    A macOS CLI + MCP server that exports Apple Books highlights to Markdown and gives AI assistants direct access to your reading notes.

    A
    Andrey Korchak
    A Developer's Guide to Agent Hooks in Antigravity CLIai

    A Developer's Guide to Agent Hooks in Antigravity CLI

    Motivation To be quite honest, "Hooks"β€”the shell commands we trigger at specific points...

    T
    Tanaike
    Tactical vs. Strategic Agentic AI Development β€” A Playbook for Developersagents

    Tactical vs. Strategic Agentic AI Development β€” A Playbook for Developers

    The Strategic Engineer: Why Writing Code Is No Longer Your Most Valuable Skill ...

    A
    Adewumi Saheed Adewale

    Stay up to date

    Get the latest CoPilot prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for CoPilot and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    Β© 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.