New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readonly fields not displayed in schema view #757
Comments
I think this is the culprit https://github.com/rapi-doc/RapiDoc/blob/v9.3.2/src/templates/expanded-endpoint-template.js#L111
|
Is the Response in the screenshot is webhook/callback ? Is it possible for you to tell me how is it rendered on Swagger UI ? |
It's not a webhook or a callback, just a normal Openapi schema Swagger UI looks like this (Tried my schema in https://editor.swagger.io/) |
This is my configuration <rapi-doc
id="semic-rapidoc-base"
spec-url="{{ schema_url }}"
use-path-in-nav-bar=true
theme="light"
load-fonts=false
nav-item-spacing="compact"
allow-spec-url-load=false
allow-spec-file-load=false
show-header=false
allow-server-selection=false
schema-description-expanded=true
info-description-headings-in-navbar=true
render-style="view" {# Swagger like layout #}
layout="row" {# Request and response side by side #}
default-schema-tab="schema"
></rapi-doc> and this is my schema object (modified DjangoUser:
type: object
properties:
id:
type: integer
readOnly: true
username:
type: string
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_
only.
pattern: ^[\\w.@+-]+$
maxLength: 150
full_name:
type: string
readOnly: true
email:
type: string
format: email
title: Email address
maxLength: 254
required:
- full_name
- id
- username
ManagementLock:
type: object
properties:
id:
type: integer
readOnly: true
start_date:
type: string
format: date-time
end_date:
type: string
format: date-time
nullable: true
user:
$ref: '#/components/schemas/DjangoUser'
comments:
type: string
nullable: true
status:
enum:
- active
- finished
- cancelled
- scheduled
type: string
readOnly: true
type:
enum:
- vcenter
- bsm
- influxdb
- artifactory
type: string
targets:
type: array
items:
type: string
readOnly: true
description: Deprecated.
deprecated: true
scopes:
type: array
items:
type: string
readOnly: true
description: Available for 'XXX' lock type only.
required:
- id
- scopes
- start_date
- status
- targets
- type
- user
``` |
Thanks for sharing. I think I have got the issue. I will work on it to fix it soon |
I'm on RapiDoc v9.3.2
After upgrading, my UI changed from
to
As you can see, all the
readonly
fields are missing from output schemaThe text was updated successfully, but these errors were encountered: