本文介绍了|, > 和有什么区别?和 >- 在 OpenAPI YAML 描述中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看 OpenAPI 和 description 标签.这些标签有什么区别?它们都支持多行,但还有别的吗?

I'm looking at OpenAPI and the description tag. What are the differences between these tags? They all support multiple lines, but anything else?

description: |
description: >
description: >-

推荐答案

description 不是 YAML 标签",它只是您正在编辑的 YAML 文件中的一个字段/属性,例如 OpenAPI 或 Swagger 文档.

description isn't a YAML "tag", it's just a field/property in the YAML file you're editing, such as an OpenAPI or Swagger document.

YAML 规范在此处描述了不同的文本折叠样式:https://yaml.org/spec/1.2/spec.html#id2793652

The YAML specification describes the different text folding styles here: https://yaml.org/spec/1.2/spec.html#id2793652

乍一看很难理解,所以这个网站让事情变得更容易,并且有交互式示例:https://yaml-multiline.info/

That's pretty hard to understand at first glance, so this site makes things a lot easier, and has interactive examples: https://yaml-multiline.info/

这篇关于|, > 和有什么区别?和 >- 在 OpenAPI YAML 描述中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 05:16