Objects with all readOnly properties appearing in POST requests
Describe the bug
If an object within a schema only contains readOnly properties, the POST request display shows the object name with no properties underneath it. The object name should not be shown as it is not involved in POST requests.
To Reproduce
- We have an employee-expense schema that contains this object:
nonReimbursable:
type: object
title: nonReimbursable
properties:
baseTotalEntered:
type: number
description: Non-reimbursable amount in base currency.
readOnly: true
reimbursementTotalEntered:
type: number
description: Total non-reimbursable amount.
readOnly: true
Notice that both of the properties are readOnly: true.
The display of the POST command looks like this:

Expected behavior
Objects that only contain readOnly:true properties should not appear in POST requests.
Environment (remove any that are not applicable):
- OS: Windows 10
- Browser: Chrome
- Platform: web
I'm experiencing the same issues. writeOnly attributes are correctly omitted from response bodies, but readOnly ones are not omitted from request bodies, which makes schemas non-reusable on requests and responses (which is very useful when using REST) and it introduces the need to separate request and response bodies in two different documentation objects rather than one "resource".