Skip to content

Replace spec file type detection with mime type instead of file extension #176

Closed
@fkjaekel

Description

@fkjaekel

Description of the bug

Hi,

All my backends are written spring boot. The spec files are generated dynamically and they don't have extensions, for example http://localhost:8088/doc/v2

So I have to download, rename and copy the spec file when I need to use the plugin, which is unproductive.

When I use the openapi generator maven plugin it works fine with extensionless remote specs, and since this plugin also uses openapi-generator-cli.jar, my suggestion is to change the plugin specific logic to detect the if the spec file is json or yaml to validate by the mime type instead of the extension.

Thanks

Steps to reproduce

explained above

Minimal openapi specification

not relevant

Annotation used

not relevant

Expected behavior

explained above

Logs


Screenshots

No response

Platform

Linux

Library version

6.1.0

Flutter version

3.27.2

Flutter channel

stable

Additional context


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions