2
我在RAML中有一個字段,需要很長的描述。有沒有辦法將它分解成多行?如何在RAML中的描述文件中創建換行符?
例子:
「說明」: 「這是一個很長的字符串」
我想它的渲染:
「說明」:「這是
很長串。」
感謝
我在RAML中有一個字段,需要很長的描述。有沒有辦法將它分解成多行?如何在RAML中的描述文件中創建換行符?
例子:
「說明」: 「這是一個很長的字符串」
我想它的渲染:
「說明」:「這是
很長串。」
感謝
您可以使用|
,打破了長隊分成多個部分: -
post:
description: |
Creates a new account. Some **bold** text here. More text. Need to fill the line, so make it longer still. Hooray!
Line two Starts here
參考: - https://github.com/raml2html/raml2html/blob/master/examples/example.raml
另一種選擇是使用!
和\n
打破行: -
post:
description: !
"Creates a new account. Some **bold** text here. More text. Need to fill the line, so make it longer still. Hooray!\n
Line two Starts here"
請注意這裏的描述應該在""
雙引號
謝謝Anirban,但我正在談論一個模式中的其中一個fiels的描述。 – fificito
在你的問題中,你明確提到:「**我在RAML中有一個字段,需要很長的描述**」 –
是的,對不起,我的壞。我對此很新,所以我提出的問題可能不明確。 – fificito