-
Notifications
You must be signed in to change notification settings - Fork 207
Closed
Labels
Description
Describe the bug
With the following schema in openapi: 3.1.1
pet:
title: petapi
type: object
description: this is pet api
properties:
constructor:
title: petapi
type:
- object
- 'null'Redocly CLI lint command fails with an error message: 'Expected type object,null but got object.' If you change the 'type' into 'types', lint is passing.
To Reproduce
Steps to reproduce the behavior:
- Use the following openapi.yaml file:
openapi: 3.1.1
info:
title: Pet API
version: 1.0.0
description: A simple API for pet-related contracts.
paths:
/pets:
get:
summary: Get pet contract information
operationId: getPet
responses:
'200':
description: Successful response with pet contract
content:
application/json:
schema:
$ref: '#/components/schemas/pet'
components:
schemas:
pet:
title: petapi
type: object
description: this is pet api
properties:
constructor:
title: petapi
type:
- object
- 'null'- Execute Redocly lint command
- See error
Expected behavior
Lint should pass
Logs
OpenAPI description
Configuration in redocly.yaml file:
extends:
- minimalRedocly Version(s)
1.33.0
Reactions are currently unavailable