-
Notifications
You must be signed in to change notification settings - Fork 537
Closed
Description
The contract below does not resolve as I would expect, when parsed with the resolve option. The parameter reference is inlined and the components section kept as is. I would expect to keep the reference and in the case of a file or remote reference replace with a local reference.
openapi: 3.0.3
info:
title: technical-definitions
description: Commons technical definitions
version: 1.0.0
servers:
- url: https://
paths:
/components/parameter:
get:
tags:
- example
operationId: getExampleById4
parameters:
- $ref: '#/components/parameters/Parameter'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Success
components:
parameters:
Parameter:
name: id
in: query
description: The ID of the example to retrieve
required: true
style: form
explode: true
schema:
type: string
This is reproducible with the parser configuration below:
var parser = new OpenAPIV3Parser();
var options = new ParseOptions();
options.setResolve(true);
parser.readContents(contract, Collections.emptyList(), options);
Metadata
Metadata
Assignees
Labels
No labels