Comments (17)
we just need to remember that this --output flag just like --watcher should be generic, reusable, so other commands can easily use it too, like diff for example
Oh now I get you 😄, yeah definitely --output
should be reusable.
from cli.
@Souvikns thanks its working.
from cli.
HI @derberg @Souvikns I am Amanpreet a contributor to OpenForce 2022. I would like to work on this issue. I would be making a PR as soon as I am done with resolving the issue. Thank you.
from cli.
I just want to ask in this command the first file passed to command should be base file or not.
from cli.
@Souvikns what do you think about the question from @amanbedi1 ? I'm personally not 100% sure but I think non of the files should be considered a base, but simply by default we should put bundled document in the terminal output, and there should also be an option like --output
that user could use to specify where to output bundled doc as a file. Thoughts?
from cli.
I just want to ask in this command the first file passed to command should be base file or not.
bundler
takes an array of files but it does not read the files, so you have to read and pass in the content. And base
is an option that you can pass. base
is for when you want to preserve some schema
objects while you are merging multiple separate specifications.
and there should also be an option like --output that user could use to specify where to output bundled doc as a file. Thoughts?
Yeah actually when bundler
had a CLI it had a --output
but since it is library now it just returns a document object and in the CLI interface we can implement the --output
. My thought behind this was since server-api
will also integrate bundler
it would be easier to just bundle and then send the final document over REST.
from cli.
Ok so I think I just have to output bundled file in terminal or --output
flag specify where to output bundled doc as a file.
I will try to resolve it.
from cli.
My thought behind this was since server-api will also integrate bundler it would be easier to just bundle and then send the final document over REST.
what do you mean @Souvikns
from cli.
I mean there is no way to output a file to a certain directory right now in bundler
. It just gives you string and JSON object. So bundler does not care about file system so tools like studio
where we do not have access to the file system can also use bundler
same goes for server-api
which will just send the data over HTTP request.
from cli.
but this is CLI where we implement bundler
option, so CLI should handle the option to output bundler-provided data into a file. Same like server-api
will handle sending reply with JSON object. As you wrote, bundler is just to bundle and provide JSON Object (or string) and tools that integrate it, like CLI or Studio or server-api handle rest, like post processing of bundler output.
we just need to remember that this --output
flag just like --watcher
should be generic, reusable, so other commands can easily use it too, like diff
for example
from cli.
Hey @derberg @Souvikns I am almost done with bundle command but there is a problem when I try to bundle below files the output is not as expected. So can you guide me how to do this. Files are attached below.
signup.yaml
asyncapi: '2.2.0'
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user Signup
channels:
user/signedup:
subscribe:
message:
payload:
type: object
properties:
displayName:
type: string
email:
type: string
format: email
login.yaml
asyncapi: '2.2.0'
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signup
channels:
user/loggenin:
subscribe:
message:
payload:
type: object
properties:
displayName:
type: string
Bundled (terminal) output
asyncapi: '2.2.0',
info: {
title: 'Account Service',
version: '1.0.0',
description: 'This service is in charge of processing user signup'
},
channels: {
'user/signedup': { subscribe: [Object] },
'user/loggenin': { subscribe: [Object] }
}
Expected output
asyncapi: '2.2.0'
info:
title: Account Service
version: 1.0.0
description: This service is in charge for processing user authentication
channles:
user/signedup:
subscribe:
message:
payload:
type: object
properties:
displayName:
type: string
email:
type: string
format: email
user/loggedin:
subscribe:
message:
payload:
type: object
properties:
displayName:
type: string
from cli.
Would be better if you open a WIP PR then I can take a look at your changes, but this is happening most probably because you are using document.json()
that's why you are getting output in JSON
format for YAML
format you have to use document.yml()
you can refer this document to learn more https://github.com/asyncapi/bundler/blob/master/API.md#Document+yml
from cli.
hey @Souvikns @derberg I just made a PR. Please review it
from cli.
This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience ❤️
from cli.
This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience ❤️
from cli.
🎉 This issue has been resolved in version 0.36.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from cli.
@amanbedi1 @Souvikns
My yml file has
$ref: ./components/channels/site-channels.yml#/channels/sites-change
The bundle command errors out with
ENOENT: no such file or directory,
as it doesn't get the path right.
My structure is
event-catalog2/
event-specs/
channels/
site-channels.yml
asyncpi.yml
and the command was looking for
C:\BLBLA\event-catalog2\components\channels\site-channels.yml'
i.e skipped event-specs folder somehow.
from cli.
Related Issues (20)
- [DART] We need a flag to generate models with json annotation HOT 1
- [CLI] Measure AsyncAPI DX metrics HOT 2
- Divide "Maintainer" role into two categories: Triager and Committer HOT 3
- Docker image fails to support Glee HOT 1
- CLI new UI/UX implementation HOT 31
- Implement new UI/UX foundations including a design system HOT 1
- Migrate to @oclif/core V3
- [CLI] Add 'source' metadata for metrics collected HOT 2
- Add parser middleware to /generate
- Deploy API to production
- Cleanup codeowners HOT 2
- Permission error when creating project from specification HOT 12
- Add Time to First API Design DX metric HOT 4
- [BUG] Missing on-workflow-trigger for update-docs-in-website action HOT 6
- [BUG] The bundle command does not bundle referenced files HOT 22
- [BUG] default Glee raises error HOT 1
- [BUG] Release pipeline is blocked by the windows cache issue HOT 3
- [CLI] Add metadata for metrics collection in remaining commands
- [FEATURE] add optional flag `rawPropertyNames` to TypeScriptFileGenerator HOT 1
- [FEATURE] Automatic Version Update Notification HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.