Skip to content

Commit

Permalink
add path an verb in openapi viewer nav bar (#821)
Browse files Browse the repository at this point in the history
* add api path and http verb in openapi viewer

* Create early-steaks-sparkle.md

---------

Co-authored-by: glc-omid <oeidivandi@lacentrale.fr>
Co-authored-by: David Boyne <boyneyy123@gmail.com>
  • Loading branch information
3 people authored Sep 21, 2024
1 parent c8118b7 commit 16c6a28
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-steaks-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@eventcatalog/core": patch
---

feat(core): added api path and http verb in openapi viewer
40 changes: 39 additions & 1 deletion examples/default/services/OrdersService/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,45 @@ paths:
required: true
schema:
type: string

delete:
summary: Delete Task
operationId: DeleteTask
responses:
'204':
description: Task deleted
'400':
description: Problem with data
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Not Authorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Delete a task
security:
- authorization: []
parameters:
- in: path
name: id
required: true
schema:
type: string
/v1/tasks:
get:
summary: Get List of Tasks
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions src/pages/docs/[type]/[id]/[version]/spec/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,26 @@ const fileExists = fs.existsSync(pathOnDisk);
) : (
<rapi-doc
spec-url={buildUrl(pathToSpec, true)}
render-style="read"
show-header="false"
allow-authentication="true"
allow-try="true"
default-schema-tab="schema"
show-curl-before-try="true"
use-path-in-nav-bar="true"
show-method-in-nav-bar="as-colored-block"
theme="light"
schema-style="table"
class="relative top-0"
style={{ height: '100vh', width: '100%', zIndex: 100 }}
regular-font="ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
schema-style="table"
default-schema-tab="schema"
bg-color="#ffffff"
text-color=""
primary-color="#6b21a8"
nav-bg-color="#fff"
nav-text-color=""
nav-hover-bg-color="#fff"
nav-hover-text-color="#6b21a8"
nav-accent-color=""
primary-color="#6b21a8"
theme="light"
render-style="read"
/>
)
}
Expand Down

0 comments on commit 16c6a28

Please sign in to comment.