Skip to content

Commit

Permalink
Show base URL in API docs output
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Sep 25, 2020
1 parent c391651 commit 7912041
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@
var baseUrl = "{{ $baseUrl }}";
</script>
<script src="js/tryitout.js"></script>
@endif
@endif

> Base URL:

```yaml
{!! $baseUrl !!}
```
2 changes: 1 addition & 1 deletion src/Extracting/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public static function setObject(array &$results, string $path, $value, array $s
}
// If there's a second item in the array, set for that too.
if ($value !== null && Arr::has($results, Str::replaceLast('[]', '.1', $baseName))) {
// If value is optional, toss a coin on whether to set or not
// If value is optional, flip a coin on whether to set or not
if ($isRequired || array_rand([true, false], 1)) {
Arr::set($results, Str::replaceLast('.0', '.1', $dotPath), $value);
}
Expand Down

0 comments on commit 7912041

Please sign in to comment.