mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 12:47:48 +00:00
Fix schema type of AsyncAPI operation tags (#1339)
* fix: Schema type of AsyncAPI operation tags * add tests * test: Expand tags test for AsyncAPI --------- Co-authored-by: Lorna Mitchell <lorna.mitchell@redocly.com>
This commit is contained in:
5
.changeset/gentle-parrots-promise.md
Normal file
5
.changeset/gentle-parrots-promise.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@redocly/openapi-core": patch
|
||||
---
|
||||
|
||||
Fix schema type of AsyncAPI operation tags
|
||||
32
__tests__/lint/async2/operation-with-tags.yml
Normal file
32
__tests__/lint/async2/operation-with-tags.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
asyncapi: '2.6.0'
|
||||
info:
|
||||
title: Account Service
|
||||
version: 1.0.0
|
||||
description: This service is in charge of processing user signups
|
||||
channels:
|
||||
user/signedup:
|
||||
subscribe:
|
||||
message:
|
||||
$ref: '#/components/messages/UserSignedUp'
|
||||
tags:
|
||||
- name: user
|
||||
- name: signup
|
||||
description: Tag descriptions are supported
|
||||
- name: register
|
||||
description: Tag descriptions and external docs are supported
|
||||
externalDocs:
|
||||
url: https://redocly.com/docs
|
||||
description: Some excellent docs
|
||||
components:
|
||||
messages:
|
||||
UserSignedUp:
|
||||
payload:
|
||||
type: object
|
||||
properties:
|
||||
displayName:
|
||||
type: string
|
||||
description: Name of the user
|
||||
email:
|
||||
type: string
|
||||
format: email
|
||||
description: Email of the user
|
||||
@@ -15,6 +15,8 @@ apis:
|
||||
root: ./oneof.yml
|
||||
operation-security:
|
||||
root: ./operation-security.yml
|
||||
operation-with-tags:
|
||||
root: ./operation-with-tags.yml
|
||||
rpc-client:
|
||||
root: ./rpc-client.yml
|
||||
rpc-server:
|
||||
|
||||
@@ -26,6 +26,9 @@ validating /oneof.yml...
|
||||
validating /operation-security.yml...
|
||||
/operation-security.yml: validated in <test>ms
|
||||
|
||||
validating /operation-with-tags.yml...
|
||||
/operation-with-tags.yml: validated in <test>ms
|
||||
|
||||
validating /rpc-client.yml...
|
||||
/rpc-client.yml: validated in <test>ms
|
||||
|
||||
|
||||
@@ -274,10 +274,7 @@ const OperationBindings: NodeType = {
|
||||
|
||||
const OperationTrait: NodeType = {
|
||||
properties: {
|
||||
tags: {
|
||||
type: 'array',
|
||||
items: { type: 'string' },
|
||||
},
|
||||
tags: 'TagList',
|
||||
summary: { type: 'string' },
|
||||
description: { type: 'string' },
|
||||
externalDocs: 'ExternalDocs',
|
||||
@@ -311,10 +308,7 @@ const MessageTrait: NodeType = {
|
||||
|
||||
const Operation: NodeType = {
|
||||
properties: {
|
||||
tags: {
|
||||
type: 'array',
|
||||
items: { type: 'string' },
|
||||
},
|
||||
tags: 'TagList',
|
||||
summary: { type: 'string' },
|
||||
description: { type: 'string' },
|
||||
externalDocs: 'ExternalDocs',
|
||||
|
||||
Reference in New Issue
Block a user