You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The oas3-valid-media-example linter complains about using nullable type when using allOf. I am using the below example schema:
openapi: 3.0.1info:
title: User APIdescription: The User API allows managing users.version: 0.1.0paths:
/api/v1/user:
patch:
summary: Patch UseroperationId: patchUserrequestBody:
description: Patch user bodyrequired: truecontent:
application/json:
example:
Name: testschema:
$ref: "#/components/schemas/PatchRequest"responses:
"200":
description: The patched user.content:
application/json:
schema:
$ref: "#/components/schemas/Name"components:
schemas:
Name:
type: stringdescription: Name of the user.maxLength: 255minLength: 1ID:
type: stringdescription: ID of the user.maxLength: 255minLength: 1PatchRequest:
description: Patch userallOf:
- $ref: "#/components/schemas/Name"
- $ref: "#/components/schemas/ID"minProperties: 1nullable: true
Why does the linter complain while using nullable:true ? Also, when i remove the example from the spec, the error goes away. I am using this code generator https://github.com/deepmap/oapi-codegen and it generates the code as expected and works fine.
The oas3-valid-media-example linter complains about using nullable type when using allOf. I am using the below example schema:
Why does the linter complain while using nullable:true ? Also, when i remove the example from the spec, the error goes away. I am using this code generator https://github.com/deepmap/oapi-codegen and it generates the code as expected and works fine.
Originally posted by @sonasingh46 in #2568
The text was updated successfully, but these errors were encountered: