Skip to content

Goland. Warning Missing required property 'version' #2106

@rndndiy

Description

@rndndiy

Describe the bug
In generated files Jetbrains Goland Code Analyzer detects warnings:

in JSON file:
Warning: Missing required property 'version'
in this block:

"info": {
    "title": "api",
    "contact": {}
},

in YAML file:
Warning: Schema validation: Missing required property 'version'
in this block:

info:
  contact: {}
  title: api

To Reproduce
Steps to reproduce the behavior:

  1. Generate JSON/YAML files via swag
  2. In Goland open Problems tab, then Code Analysis
  3. See warnings list

Expected behavior
No warnings

Your swag version
v1.16.4

Your go version
go1.25

Desktop (please complete the following information):

  • OS: windows/amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions