-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Deep linking does not work without operationId #4895
Copy link
Copy link
Closed
Description
Q&A (please complete the following information)
- OS: Linux
- Browser: firefox
- Version: 62
- Method of installation: Local
- Swagger-UI version:
master - Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Example Swagger/OpenAPI definition:
components:
requestBodies:
Pet:
content:
application/json:
schema:
"$ref": "#/components/schemas/Pet"
application/xml:
schema:
"$ref": "#/components/schemas/Pet"
description: Pet object that needs to be added to the store
required: true
schemas:
Category:
properties:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Category
Order:
properties:
complete:
default: false
type: boolean
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
type: object
xml:
name: Order
Pet:
properties:
category:
"$ref": "#/components/schemas/Category"
id:
format: int64
type: integer
name:
example: doggie
type: string
photoUrls:
items:
type: string
type: array
xml:
name: photoUrl
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
tags:
items:
"$ref": "#/components/schemas/Tag"
type: array
xml:
name: tag
wrapped: true
required:
- name
- photoUrls
type: object
xml:
name: Pet
Tag:
properties:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Tag
info:
contact:
email: [email protected]
description: This is a sample Petstore server.
title: Swagger Petstore
version: 1.0.0
openapi: 3.0.0
paths:
"/pet":
post:
requestBody:
"$ref": "#/components/requestBodies/Pet"
responses:
'405':
description: Invalid input
summary: Add a new pet to the store
tags:
- pet
servers: []Swagger-UI configuration options:
SwaggerUIBundle({
url: "test.json",
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
deepLinking: true
})URL
http://0.0.0.0:3200/#/pet/post_pet
Describe the bug you're encountering
An operation without an operationId will not work with deep linking.
To reproduce...
Steps to reproduce the behavior:
- Start the dev server with the config from above
- Go to
http://0.0.0.0:3200/#/pet/post_pet - Observe that the pet operation is not unfolded
Expected behavior
Deep linking works 😺
Reactions are currently unavailable