Closed jy95 closed 4 years ago
I'm glad to help where I can. I'm also glad that you're enjoying this library.
Will you send me a link for the full OpenAPI document or include it in a comment here. That will help with debugging. Thanks.
As I split my OAS into several files in my repository, the problem is localizated here :
components:
schemas:
SearchDataCriterias:
type: object
description: "Search criterias"
properties:
title:
type: string
description: "Something we want to find inside the title of exercises"
maxLength: 100
example: "SINF2MS"
tags:
type: array
items:
oneOf:
- type: integer
format: int32
example: 1
- type: array
items:
type: integer
format: int32
minItems: 1 # Not allowing empty array if we use it
description: "Tags search encoded in Conjunctive Normal Form. (for NOT predicat, use a negative integer)"
example: [-1, [2, 3]]
user_ids:
type: array
description: "Filter the exercises by their creators."
minItems: 1
items:
type: integer
minimum: 0
description: "An user ID"
uniqueItems: true
exercise_ids:
type: array
description: "Filter the exercises by their ids."
minItems: 1
items:
type: integer
minimum: 0
description: "An exercise ID"
uniqueItems: true
vote:
description: "Only take exercises that meet a given threshold"
type: object
properties:
operator:
description: "The operation we want to apply"
type: string
enum: ['<=', '<', '>=', '>']
value:
description: "The threshold value"
type: number
minimum: 0.0
maximum: 5.0
example: 5.0
required:
- operator
- value
Wow, I had to dig to find that one. :)
This is fixed and published to NPM as version 1.8.8
.
Some days I feel like a bug detector unintentionally ^^ Thanks
Hello,
First thanks @Gi60s for the regular improvements. I found a little bug that prevents to update openapi-enforcer 1.8.1 to the latest version (1.8.7)
In my OAS definition, I included some examples for requests :
but It seems openapi-enforcer is unable to validate these examples :
Thanks for the help