Project

General

Profile

0008-api-add-long_description-for-POST-endpoints-35818.patch

Benjamin Dauvergne, 25 Oct 2019 10:48 AM

Download (1.47 KB)

View differences:

Subject: [PATCH 8/9] api: add long_description for POST endpoints (#35818)

 passerelle/templates/passerelle/manage/service_view.html | 5 +++++
 passerelle/utils/api.py                                  | 4 ++++
 2 files changed, 9 insertions(+)
passerelle/templates/passerelle/manage/service_view.html
76 76
         {% endfor %}
77 77
       </ul>
78 78
       {% endif %}
79
       {% if endpoint.long_description %}
80
         <div class="long-description">
81
           {{ endpoint.long_description }}
82
         </div>
83
       {% endif %}
79 84
    </li>
80 85
    {% endfor %}
81 86
    </ul>
passerelle/utils/api.py
120 120
    def description(self):
121 121
        return self.descriptions.get(self.http_method)
122 122

  
123
    @property
124
    def long_description(self):
125
        return self.http_method == 'post' and self.post and self.post.get('long_description')
126

  
123 127
    def get_params(self):
124 128
        params = []
125 129
        defaults = dict(zip(
126
-