urltool.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Codado 作者: corydodt 项目源码 文件源码
def _parseRawDoc(self, operation):
        """
        Set doc fields of this operation by using the Documentation object

        - If the Documentation object has a .yamlData property, we update values
          of the operation properties from them. Unrecognized properties will
          be added with the 'x-' prefix.
        - Documentation.full is the description
        - Documentation.first is the summary
        """
        operation.summary = self.doco.first
        operation.description = self.doco.full
        if self.doco.yamlData:
            fieldNames = [f.name for f in attr.fields(operation.__class__)]
            for k in self.doco.yamlData:
                if k in fieldNames:
                    setattr(operation, k, self.doco.yamlData[k])
                else:
                    operation._extended['x-' + k] = self.doco.yamlData[k]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号