event-catalog / event-catalog/generators
AsyncAPI generator is putting services into the user content folder in EventCatalog
- Dominant language
- TypeScript
- Stars
- 15
- Forks
- 16
- Avg merge
- 25m
- Merged PRs (30d)
- 4
Description
### I tried this:
In the examples (currently) the `user-service.yml` file
```
import path from 'path';
import url from 'url';
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
/** @type {import('@eventcatalog/core/bin/eventcatalog.config').Config} */
export default {
cId: 'f8597068-04ce-4cbc-97d4-ceb18b709fd1',
title: 'OurLogix',
tagline: 'A comprehensive logistics and shipping management company',
organizationName: 'OurLogix',
homepageLink: 'https://eventcatalog.dev/',
landingPage: '',
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
// By default set to false, add true to get urls ending in /
trailingSlash: false,
// Change to make the base url of the site different, by default https://{website}.com/docs,
// changing to /company would be https://{website}.com/company/docs,
base: '/',
// Customize the logo, add your logo to public/ folder
logo: {
alt: 'EventCatalog Logo',
src: '/logo.png',
text: 'OurLogix',
},
docs: {
sidebar: {
// Should the sub heading be rendered in the docs sidebar?
showPageHeadings: true,
},
},
generators: [
[
'@eventcatalog/generator-asyncapi',
{
services: [
{ path: path.join(__dirname, 'asyncapi-files', 'user-service.yml'), id: 'User Service' },
],
domain: { id: 'users', name: 'User', version: '0.0.1' },
debug: true
},
],
],
};
```
Is getting mapped into the `.eventcatalog-core/content/users` folder, I think some splitting is done somewhere given the naming clashes here.
To replicate just have this simple `user-service.yml` file
```
asyncapi: 3.0.0
info:
title: User Service
description: description
version: 1.1.0
channels:
randomChannel:
address: myAddress
messages:
UserSignup:
$ref: '#/components/schemas/UserSignedUp/schema'
operations:
sendNoise:
action: send
channel:
$ref: '#/channels/randomChannel'
components:
schemas:
UserSignedUp:
schemaFormat: 'application/schema+json;version=draft-07'
schema:
'$ref': './user-signed-up.yml#/UserSignedUp'
```
And import into AsyncAPI generator.
### This happened:
Catalog would not load.
### I expected this:
Catalog to load and the service to display and info not mapped to the User folder under the hood.
### Is there a workaround?
_No response_
### Anything else?
_No response_
### EventCatalog Version
_No response_
### Node.js Version
_No response_
### Platform(s)
_No response_
### Community Notes
* Please vote by adding a 👍 reaction to the issue to help us prioritize.
* If you are interested to work on this issue, please leave a comment.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.