swagger-api / swagger-api/swagger-parser
parsing a v3.1.0 spec omits defined minLength
Open
@gracekarina is already working on this.
Since Sep 28, 2022.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
swagger-parser version: 2.1.1
spec: defined below below
Issue:
parsing of component schema MinLengthValidationWithADecimal omitsthe existing minLength from the parser result
Here is the pasted parser result for that schema:
MinlengthValidationWithADecimal -> {JsonSchema@4942} "class JsonSchema {
class Schema {
type: null
format: null
$ref: null
description: null
title: null
multipleOf: null
maximum: null
exclusiveMaximum: null
minimum: null
exclusiveMinimum: null
maxLength: null
minLength: null
pattern: null
maxItems: null
minItems: null
uniqueItems: null
maxProperties: null
minProperties: null
required: null
not: null
properties: null
additionalProperties: null
nullable: null
readOnly: null
writeOnly: null
example: null
externalDocs: null
deprecated: null
discriminator: null
xml: null
patternProperties: null
contains: null
$id: null
$anchor: null
$schema: https://json-schema.org/draft/2020-12/schema
const: null
contentEncoding: null
contentMediaType: null"
spec:
openapi: 3.1.0
servers:
- url: https://someserver.com/v1
info:
title: openapi 3.1.0 sample spec
version: 0.0.1
description: sample spec for testing openapi functionality, built from json schema
tests for draft2020-12
tags: []
paths: {}
components:
schemas:
MinlengthValidationWithADecimal:
$schema: https://json-schema.org/draft/2020-12/schema
minLength: 2.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.