@@ -151,68 +151,73 @@ class="btn btn-default curl"
151
151
<span class="glyphicon glyphicon-copy"></span>
152
152
</a>
153
153
<p class="lead"><?= $ transition ->description ; ?> </p>
154
- <div class="panel panel-default">
155
- <div class="panel-heading">
156
- <h4 class="request panel-title"
157
- data-toggle="collapse"
158
- data-target="#request-coll-<?= $ transition ->get_href (); ?> ">Request
159
- <span class="glyphicon indicator glyphicon-menu-down pull-right"></span>
160
- </h4>
161
- </div>
162
- <?php if (isset ($ transition ->request )): ?>
163
- <div class="collapse in request-panel panel-body"
164
- id="request-coll-<?= $ transition ->get_href (); ?> ">
165
- <?php if ($ transition ->url_variables !== []): ?>
166
- <h5>Example URI</h5>
167
- <span class="base-url"><?= $ this ->base_data ['HOST ' ]; ?> </span>
168
- <em><?= $ transition ->build_url (); ?> </em>
169
- <?php endif ; ?>
170
- <?php if ($ transition ->request ->headers !== []): ?>
171
- <h5>Headers</h5>
172
- <ul class="headers list-unstyled">
173
- <?php foreach ($ transition ->request ->headers as $ name => $ value ): ?>
174
- <li>
175
- <code><span class="attr"><?= $ name ; ?> </span>: <span
176
- class="value"><?= $ value ; ?> </span>
177
- </code>
178
- </li>
179
- <?php endforeach ; ?>
180
- </ul>
181
- <?php endif ; ?>
182
- <?php if (!empty ($ transition ->request ->body )): ?>
183
- <h5>Body</h5>
184
- <?php foreach ($ transition ->request ->body as $ value ): ?>
185
- <?php if (is_string ($ value )): ?>
186
- <code class="request-body"><?= $ value ; ?> </code>
187
- <?php else : ?>
188
- <?php $ type =
189
- (isset ($ transition ->request ->headers ['Content-Type ' ])) ? $ transition ->request ->headers ['Content-Type ' ] : null ; ?>
190
- <?= $ value ->print_request ($ type ); ?>
191
- <?= $ value ?>
192
- <?php endif ; ?>
193
- <?php endforeach ; ?>
194
- <?php endif ; ?>
195
- <?php if (!empty ($ transition ->request ->struct )): ?>
196
- <h5>Structure</h5>
197
- <div class="row">
198
- <?= $ transition ->request ->struct ?>
154
+ <?php if (!empty ($ transition ->requests )): ?>
155
+ <?php foreach ($ transition ->requests as $ request ): ?>
156
+ <div class="panel panel-default">
157
+ <div class="panel-heading">
158
+ <h4 class="request panel-title"
159
+ data-toggle="collapse"
160
+ data-target="#request-coll-<?= $ transition ->get_href (); ?> ">Request
161
+ <span
162
+ class="glyphicon indicator glyphicon-menu-down pull-right"></span>
163
+ </h4>
199
164
</div>
200
- <?php endif ; ?>
201
- <?php endif ; ?>
202
165
203
- <?php if ($ transition ->url_variables !== null ): ?>
204
- <h5>URI Parameters</h5>
205
- <div class="row">
206
- <?= $ transition ->url_variables ; ?>
207
- </div>
208
- <?php endif ; ?>
166
+ <div class="collapse in request-panel panel-body"
167
+ id="request-coll-<?= $ transition ->get_href (); ?> ">
168
+ <?php if ($ transition ->url_variables !== []): ?>
169
+ <h5>Example URI</h5>
170
+ <span class="base-url"><?= $ this ->base_data ['HOST ' ]; ?> </span>
171
+ <em><?= $ transition ->build_url (); ?> </em>
172
+ <?php endif ; ?>
173
+ <?php if ($ request ->headers !== []): ?>
174
+ <h5>Headers</h5>
175
+ <ul class="headers list-unstyled">
176
+ <?php foreach ($ request ->headers as $ name => $ value ): ?>
177
+ <li>
178
+ <code><span class="attr"><?= $ name ; ?> </span>: <span
179
+ class="value"><?= $ value ; ?> </span>
180
+ </code>
181
+ </li>
182
+ <?php endforeach ; ?>
183
+ </ul>
184
+ <?php endif ; ?>
185
+ <?php if (!empty ($ request ->body )): ?>
186
+ <h5>Body</h5>
187
+ <?php foreach ($ request ->body as $ value ): ?>
188
+ <?php if (is_string ($ value )): ?>
189
+ <code class="request-body"><?= $ value ; ?> </code>
190
+ <?php else : ?>
191
+ <?php $ type =
192
+ (isset ($ request ->headers ['Content-Type ' ])) ? $ request ->headers ['Content-Type ' ] : null ; ?>
193
+ <?= $ value ->print_request ($ type ); ?>
194
+ <?= $ value ?>
195
+ <?php endif ; ?>
196
+ <?php endforeach ; ?>
197
+ <?php endif ; ?>
198
+ <?php if (!empty ($ request ->struct )): ?>
209
199
210
- <?php if ($ transition ->data_variables !== null ): ?>
211
- <h5>Data object</h5>
212
- <?= $ transition ->data_variables ?>
213
- <?php endif ; ?>
214
- </div>
215
- </div>
200
+ <h5>Structure</h5>
201
+ <div class="row">
202
+ <?= $ request ->struct ?>
203
+ </div>
204
+ <?php endif ; ?>
205
+
206
+ <?php if ($ transition ->url_variables !== null ): ?>
207
+ <h5>URI Parameters</h5>
208
+ <div class="row">
209
+ <?= $ transition ->url_variables ; ?>
210
+ </div>
211
+ <?php endif ; ?>
212
+
213
+ <?php if ($ transition ->data_variables !== null ): ?>
214
+ <h5>Data object</h5>
215
+ <?= $ transition ->data_variables ?>
216
+ <?php endif ; ?>
217
+ </div>
218
+ </div>
219
+ <?php endforeach ; ?>
220
+ <?php endif ; ?>
216
221
<?php if (isset ($ transition ->responses )): ?>
217
222
<?php foreach ($ transition ->responses as $ response ): ?>
218
223
<div class="panel panel-default">
0 commit comments