Skip to content

Instantly share code, notes, and snippets.

@rhamiltonsf
Last active September 20, 2021 22:16
Show Gist options
  • Save rhamiltonsf/56b142ee74480fb93230b6808c015a27 to your computer and use it in GitHub Desktop.
Save rhamiltonsf/56b142ee74480fb93230b6808c015a27 to your computer and use it in GitHub Desktop.
[spring/spring-boot] This spec will generate code correctly
openapi: 3.0.1
info:
title: Example API
version: '1.0'
paths:
/test:
post:
requestBody:
$ref: '#/components/requestBodies/setupReq'
responses:
'201':
description: ok
components:
requestBodies:
setupReq:
content:
application/json:
schema:
type: string
@rhamiltonsf
Copy link
Author

Specification created for openapi-generator #10435 which shows that refs can be used for requestBodies, but only if the requestBody schema is not of type object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment