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.

OpenAPI 3.0.0 - Support schema object

See original GitHub issue

Types, formats and defaults of parameters should be stored in the new Schema Object. Although SchemaType is set to OpenAPI3 it still uses the Swagger2 syntax for parameters. I guess it is simply not implemented yet, but it is pretty important to me, because otherwise the UI displays any as the type of the parameter and the defaults are missing.

In Swagger 2.0 you could store types and defaults in the parameter directly:

"parameters": [{
            "type": "integer",
            "format": "int32",
            "default": 42,
            "name": "test",
            "in": "query",
            "description": "simple int"
          }]

but in OpenAPI 3.0.0 and up you have to use the schema object:

"parameters": [{
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 42
            },
            "name": "test",
            "in": "query",
            "description": "simple int"
          }]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
darrelmillercommented, Aug 3, 2018

@RSuter Parameter now contains a complete schema object rather than inheriting a few properties. Or if it contains a content object in theory it could have multiple schema objects.

0reactions
darrelmillercommented, Aug 3, 2018

@RSuter We did the same thing with Response Headers. There’s no way I wanted to have to define all those properties multiple times 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenAPI Specification - Version 3.0.3
The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for...
Read more >
OpenAPI Specification v3.0.0 | Introduction, Definitions, & ...
Models are defined using the Schema Object, which is an extended subset of JSON Schema Specification Wright Draft 00. Primitives have an ...
Read more >
Data Models (Schemas)
OpenAPI 3.0 data types are based on an extended subset JSON Schema Specification Wright Draft 00 ... The data types are described using...
Read more >
OpenAPI Specification v3.0.2 | Introduction, Definitions, & ...
Models are defined using the Schema Object, which is an extended subset of JSON Schema Specification Wright Draft 00. Primitives have an ...
Read more >
What's New in OpenAPI 3.0 - Bits and Pieces
OpenAPI Schema is now a valid JSON Schema. The Schema object characterizes everything inside the 'schema' keyword in OpenAPI. It has forever ...
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