Skip to content

Commit

Permalink
fixes #762 Fill example should work for all data types
Browse files Browse the repository at this point in the history
  • Loading branch information
mrin9 committed Jun 12, 2022
1 parent c9ac0d7 commit 145a5ce
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 2,535 deletions.
27 changes: 27 additions & 0 deletions docs/examples/fill-example-test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src='https://www.googletagmanager.com/gtag/js?id=UA-132775238-1'></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-132775238-1');
</script>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes'>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600&family=Roboto+Mono&display=swap" rel="stylesheet">
<script type='text/javascript' src='../rapidoc-min.js'></script>
</head>
<body>
<rapi-doc spec-url="../specs/fill-example-test.yaml"
allow-authentication = "false"
show-info = "false"
show-header = "false"
allow-server-selection = "false"
render-style = "read"
allow-try = "true"
> </rapi-doc>
</body>
</html>
4 changes: 4 additions & 0 deletions docs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,10 @@ <h2 style="font-weight:700"> Mix HTML content </h2>
<a href="./examples/data-types.html"> Data types </a>
</td></tr>

<tr><td class="mono-bold">
<a href="./examples/fill-example-test.html"> Fill various example data types </a>
</td></tr>

<tr><td class="mono-bold">
<a href="./examples/schema-title-and-descriptions.html"> Schema Title and Descriptions </a>
</td></tr>
Expand Down
52 changes: 52 additions & 0 deletions docs/specs/fill-example-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
openapi: 3.1.0
info:
title: Minimum Reproduction
paths:
/path:
get:
operationId: get.path
parameters:
- name: param1
in: query
description: string example
required: false
style: form
explode: true
schema:
type: string
examples:
- example1
- name: param2
in: query
description: array examples
required: false
style: form
explode: true
schema:
type: array
items:
type: string
examples:
- example1
- example2
- ['example1', 'example2']
- name: param3
in: query
description: boolean `true` example
required: false
style: form
explode: true
schema:
type: boolean
examples:
- true
- name: param4
in: query
description: boolean `false` example
required: false
style: form
explode: true
schema:
type: boolean
examples:
- false
Loading

0 comments on commit 145a5ce

Please sign in to comment.