question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

swagger core does not support parameter fields defined in swagger spec 2.0

See original GitHub issue

To support swagger spec 2.0 the following fields have to be added to SerializableParameter and AbstractSerializableParameter

See spec 2.0 params: https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parameterObject

missing fields:

    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor17.
     */
    public Number maximum;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor17
     */
    public Boolean exclusiveMaximum;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor21
     */
    public Number minimum;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor21
     */
    public Boolean exclusiveMinimum;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor26
     */
    public Integer maxLength;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor29
     */
    public Integer minLength;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor33
     */
    public String pattern;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor42
     */
    public Integer maxItems;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor45
     */
    public Integer minItems;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor49
     */
    public Boolean uniqueItems;
    /**
     * See http://json-schema.org/latest/json-schema-validation.html#anchor14
     */
    public Number multipleOf;

recommended solution: https://github.com/swagger-api/swagger-core/pull/1524

Please take take a look.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fehguycommented, Mar 14, 2017

Not yet, but it’s about to be in.

0reactions
danialfaridsadacommented, Mar 14, 2017

Is there any annotation support for minItems, maxItems, etc?

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenAPI Specification - Version 2.0 - Swagger
Version 2.0 specification defines a set of files required to describe an API. ... This property does not define global parameters for all...
Read more >
"Not supported by Swagger 2.0: Multiple operations with path ...
I see in the README that Swagger 2.0 does not include the query string component when mapping a URL to an action.
Read more >
Swagger 2.0 - how to make "one or the other" parameter ...
OpenAPI (fka Swagger) Specification does not support conditional or mutually exclusive parameters (of any type). There is an open feature request:
Read more >
F.A.Q - Springdoc-openapi
This annotation does not support nested parameter objects. POJO object must contain getters for fields with mandatory prefix get . Otherwise, the swagger...
Read more >
Using OpenAPI and Swagger UI - Quarkus
This guide explains how your Quarkus application can expose its API description through an OpenAPI specification and how you can test it via...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found