首页 > 解决方案 > 如何重用和附加特定的文本模板

问题描述

如下代码所示,我想重用 text/*

Bad request.Assert that the values provided adhere to the following order and comma separated':'originLng, originLat, destinationLng, destinationLat.

因此,在下面提到的其他部分中,如何重用相同的文本以 & 符号开头。我想要类似的东西

Ref_Response_OnResponse_String_401:
  description: Authorization information is missing or invalid  
    *descriptionOnResponseString_4XX      
  content:
    text/*:
      schema: 
        $ref: '#/components/schemas/Ref_Schema_PlainText'
Ref_Response_OnResponse_String_404:
  description: Bad request. *descriptionOnResponseString_4XX      
  content:
    text/*:
      schema: 
        $ref: '#/components/schemas/Ref_Schema_PlainText'  
        

我想附加标有 *descriptionOnResponseString_4XX 的特定文本

代码

Ref_Response_OnResponse_String_400:
  description: &descriptionOnResponseString_4XX Bad request.Assert that the values provided adhere to the following order and comma separated':'originLng, originLat, destinationLng, destinationLat.
  content:
    text/*:
      schema: 
        $ref: '#/components/schemas/Ref_Schema_PlainText'
Ref_Response_OnResponse_String_401:
  description: Authorization information is missing or invalid   
  content:
    text/*:
      schema: 
        $ref: '#/components/schemas/Ref_Schema_PlainText'
Ref_Response_OnResponse_String_404:
  description: Bad request.
  content:
    text/*:
      schema: 
        $ref: '#/components/schemas/Ref_Schema_PlainText'  

标签: swaggerswagger-uiopenapiopenapi-generator

解决方案


推荐阅读