Skip to content

Commit

Permalink
Rename core package to ui package and update references
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisllontop committed Sep 3, 2024
1 parent 4a6710b commit c2f8b15
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Web component that renders API documentation using the simplified output from `@
- Easy integration as a web component.
- Supports OpenAPI 3.x specifications.

For more details, see the [`@docutopia/ui`](packages/core/README.md).
For more details, see the [`@docutopia/ui`](packages/ui/README.md).

## Contributing

Expand Down
1 change: 0 additions & 1 deletion packages/core/README.md

This file was deleted.

56 changes: 56 additions & 0 deletions packages/ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@


# Docutopia UI

## Overview
Docutopia UI is a customizable web component designed to render API documentation from OpenAPI specifications. It offers a high level of customization, allowing you to tailor the user interface to your specific needs.

## Key Features
- **High Customization:** Customize every aspect of your API documentation using slots for a unique and branded experience.
- **Web Component:** Easily integrate Docutopia UI into any web application as a web component.
- **Compatible with OpenAPI 3.x:** Supports the latest OpenAPI standards for comprehensive API documentation.

## Usage

### Basic usage

To use Docutopia UI, you need to install the package from npm:

```bash
npm install @docutopia/ui
```

Once installed, you can use the `@docutopia/ui` component in your HTML:

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Docutopia UI Example</title>
</head>
<body>
<docutopia spec="https://example.com/openapi.yaml"></docutopia>
</body>
</html>
```

### Customization

Docutopia UI allows you to customize various parts of the documentation by using slots. For example, you can customize how each endpoint is displayed in the sidebar like this:

```html
<docutopia spec="https://example.com/openapi.yaml">
<template slot="sidebarItem">
<!-- Personalization of an endpoint -->
<li class="sidebar-endpoint-item">
<a href="{{path}}">
<span class="method">{{method}}</span> - {{description}}
</a>
</li>
</template>
</docutopia>
```

In this example, `path`, `method`, and `description` are tags that correspond to the properties from the output of `@docutopia/parser`. This output simplifies the OpenAPI specification into a format that is easier to use for customizing your UI.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c2f8b15

Please sign in to comment.