I use Swagger Editor to render API documentation and generate Python client.
I've imported Swagger JSON Definition for one of public APIs that get's transformed by the editor into YAML.
However, for parameters of enum type I am getting the following error:
Structural error at paths./aggregates/metadata.get.parameters.0.type
should be equal to one of the allowed values
allowedValues: string, number, boolean, integer, array
Jump to line 23
Is it a bug in Swagger Editor, a bug in the definition I picked up or some version incompatibility?
Here's a related Swagger definition in YAML:
swagger: '2.0'
info:
version: v1
title: BDL API
termsOfService: ''
basePath: /api/v1
paths:
/aggregates/metadata:
get:
tags:
- Aggregates
summary: Metadane / Metadata
operationId: AggregatesMetadataGet
consumes: []
produces:
- application/json
- application/xml
parameters:
- name: lang
in: query
description: ''
required: false
type: enum
enum:
- pl
- en