Closed klyver closed 1 year ago
@klyver
Could you please provide more details
What version of gradle? what version of the plugin?
Sample input yaml files
Sure.
gradle version 6.6.1 openapi-merger-gradle-plugin version 1.0.4.
bookget.yaml:
info:
title: OpenAPI definition
version: v0
servers:
- url: http://localhost:8080
description: Generated server url
paths:
/api/book/{name}:
get:
tags:
- book-controller
operationId: getBook
parameters:
- name: name
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/Book'
components:
schemas:
Book:
type: object
properties:
name:
type: string
iban:
type: string
and bookpost.yaml
info:
title: OpenAPI definition
version: v0
servers:
- url: http://localhost:8080
description: Generated server url
paths:
/api/book/{name}:
post:
tags:
- book-controller
operationId: getBook
parameters:
- name: name
in: path
required: true
schema:
type: string
requestBody:
description: The state altering event
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Book'
responses:
"200":
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/Book'
components:
schemas:
Book:
type: object
properties:
name:
type: string
iban:
type: string
@klyver
This is a defect and can be addressed in the next version.
That sounds great!
Are there any news regarding this topic?
Will test and then do a release as soon as possible
Released in 1.0.5
Scenario: You have the same endpoint different schemas, but with different http methods. E.g. schema1 has
GET /books
and schema2 hasPOST /books
. Ideally there should be no problem in merging such two schemas. Right now eitherGET /books
orPOST /books
will be left out of the result.