@asyncapi/generator 1.9.2 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ - Using welcoming and inclusive language
12
+ - Being respectful of differing viewpoints and experiences
13
+ - Gracefully accepting constructive criticism
14
+ - Focusing on what is best for the community
15
+ - Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ - The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ - Trolling, insulting/derogatory comments, and personal or political attacks
21
+ - Public or private harassment
22
+ - Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at fmvilas@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
package/CONTRIBUTING.md CHANGED
@@ -1,38 +1,61 @@
1
- ## Overview
1
+ # Contributing to AsyncAPI
2
+ We love your input! We want to make contributing to this project as easy and transparent as possible.
2
3
 
3
- Contributions are more than welcome. If you want to contribute, please make sure you go through the following steps:
4
+ ## Contribution recogniton
4
5
 
5
- 1. Pick or create an issue.
6
- - It's always a good idea to leave a message saying that you're going to work on it before you start any actual work.
7
- - Consider contacting us on [slack](https://www.asyncapi.com/slack-invite/) to discuss the topic first
8
- 2. Fork the repository and work there.
9
- 3. Open a Pull Request pointing to the `master` branch.
10
- 4. A maintainer will review and, eventually, merge your Pull Request. Please, be patient as most of us are doing this in our spare time.
6
+ We use [All Contributors](https://allcontributors.org/docs/en/specification) specification to handle recognitions. For more details read [this](https://github.com/asyncapi/community/blob/master/recognize-contributors.md) document.
11
7
 
12
- ## Code validation
8
+ ## Summary of the contribution flow
13
9
 
14
- Before creating a Pull Request you should validate your code with ESLint.
10
+ The following is a summary of the ideal contribution flow. Please, note that Pull Requests can also be rejected by the maintainers when appropriate.
15
11
 
16
12
  ```
17
- npm run lint
13
+ ┌───────────────────────┐
14
+ │ │
15
+ │ Open an issue │
16
+ │ (a bug report or a │
17
+ │ feature request) │
18
+ │ │
19
+ └───────────────────────┘
20
+
21
+ ┌───────────────────────┐
22
+ │ │
23
+ │ Open a Pull Request │
24
+ │ (only after issue │
25
+ │ is approved) │
26
+ │ │
27
+ └───────────────────────┘
28
+
29
+ ┌───────────────────────┐
30
+ │ │
31
+ │ Your changes will │
32
+ │ be merged and │
33
+ │ published on the next │
34
+ │ release │
35
+ │ │
36
+ └───────────────────────┘
18
37
  ```
19
38
 
20
- ## Developing with Docker
39
+ ## Code of Conduct
40
+ AsyncAPI has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](./CODE_OF_CONDUCT.md) so that you can understand what sort of behaviour is expected.
21
41
 
22
- In case you want to quickly build a docker image locally to check if it works then run `npm run docker-build`
42
+ ## Our Development Process
43
+ We use Github to host code, to track issues and feature requests, as well as accept pull requests.
23
44
 
24
- In case you don't have a local node environment you can run
45
+ ## Issues
46
+ [Open an issue](https://github.com/asyncapi/asyncapi/issues/new) **only** if you want to report a bug or a feature. Don't open issues for questions or support, instead join our [Slack workspace](https://www.asyncapi.com/slack-invite) and ask there. Don't forget to follow our [Slack Etiquette](https://github.com/asyncapi/community/blob/master/slack-etiquette.md) while interacting with community members! It's more likely you'll get help, and much faster!
25
47
 
26
- ```
27
- docker build -t asyncapi/generator:latest .
28
- docker run -v `pwd`:`pwd` -w `pwd` -it --rm --entrypoint /bin/sh asyncapi/generator:latest
29
- npm install
30
- ./cli.js --help
31
- ```
48
+ ## Bug Reports and Feature Requests
49
+
50
+ Please use our issues templates that provide you with hints on what information we need from you to help you out.
51
+
52
+ ## Pull Requests
53
+
54
+ **Please, make sure you open an issue before starting with a Pull Request, unless it's a typo or a really obvious error.** Pull requests are the best way to propose changes to the specification. Get familiar with our document that explains [Git workflow](https://github.com/asyncapi/community/blob/master/git-workflow.md) used in our repositories.
32
55
 
33
56
  ## Conventional commits
34
57
 
35
- This project follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) specification. Releasing to GitHub and NPM is done with the support of [semantic-release](https://semantic-release.gitbook.io/semantic-release/).
58
+ Our repositories follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) specification. Releasing to GitHub and NPM is done with the support of [semantic-release](https://semantic-release.gitbook.io/semantic-release/).
36
59
 
37
60
  Pull requests should have a title that follows the specification, otherwise, merging is blocked. If you are not familiar with the specification simply ask maintainers to modify. You can also use this cheatsheet if you want:
38
61
 
@@ -48,3 +71,9 @@ What about MAJOR release? just add `!` to the prefix, like `fix!: ` or `refactor
48
71
  Prefix that follows specification is not enough though. Remember that the title must be clear and descriptive with usage of [imperative mood](https://chris.beams.io/posts/git-commit/#imperative).
49
72
 
50
73
  Happy contributing :heart:
74
+
75
+ ## License
76
+ When you submit changes, your submissions are understood to be under the same [Apache 2.0 License](https://github.com/asyncapi/asyncapi/blob/master/LICENSE) that covers the project. Feel free to [contact the maintainers](https://www.asyncapi.com/slack-invite) if that's a concern.
77
+
78
+ ## References
79
+ This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/master/CONTRIBUTING.md).
package/README.md CHANGED
@@ -317,6 +317,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
317
317
  <td align="center"><a href="https://github.com/muenchhausen"><img src="https://avatars.githubusercontent.com/u/1210783?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Derk Muenchhausen</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=muenchhausen" title="Code">💻</a></td>
318
318
  <td align="center"><a href="http://ben.timby.com/"><img src="https://avatars.githubusercontent.com/u/669270?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ben Timby</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=btimby" title="Code">💻</a></td>
319
319
  </tr>
320
+ <tr>
321
+ <td align="center"><a href="https://github.com/lkmandy"><img src="https://avatars.githubusercontent.com/u/17765231?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amanda Shafack </b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=lkmandy" title="Documentation">📖</a></td>
322
+ </tr>
320
323
  </table>
321
324
 
322
325
  <!-- markdownlint-restore -->
package/docs/authoring.md CHANGED
@@ -184,7 +184,7 @@ The `generator` property from `package.json` file must contain a JSON object tha
184
184
  |`conditionalFiles[filePath].subject`| String | The `subject` is a [JMESPath](http://jmespath.org/) query to grab the value you want to apply the condition to. It queries an object with the whole AsyncAPI document and, when specified, the given server. The object looks like this: `{ asyncapi: { ... }, server: { ... } }`. If template supports `server` parameter, you can access server details like for example protocol this way: `server.protocol`. During validation with `conditionalFiles` only the server that template user selected is available in the specification file. For more information about `server` parameter [read about special parameters](#special-parameters).
185
185
  |`conditionalFiles[filePath].validation`| Object | The `validation` is a JSON Schema Draft 07 object. This JSON Schema definition will be applied to the JSON value resulting from the `subject` query. If validation doesn't have errors, the condition is met, and therefore the given file will be rendered. Otherwise, the file is ignored. Check [JSON Schema Validation](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6) document for a list of all possible validation keywords.
186
186
  |`nonRenderableFiles`| [String] | A list of file paths or [globs](https://en.wikipedia.org/wiki/Glob_(programming)) that must be copied "as-is" to the target directory, i.e., without performing any rendering process. This is useful when you want to copy binary files.
187
- |`generator`| [String] | A string representing the Generator version-range the template is compatible with. This value must follow the [semver](https://docs.npmjs.com/misc/semver) syntax. E.g., `>=1.0.0`, `>=1.0.0 <=2.0.0`, `~1.0.0`, `^1.0.0`, `1.0.0`, etc.
187
+ |`generator`| [String] | A string representing the Generator version-range the template is compatible with. This value must follow the [semver](https://nodejs.dev/learn/semantic-versioning-using-npm) syntax. E.g., `>=1.0.0`, `>=1.0.0 <=2.0.0`, `~1.0.0`, `^1.0.0`, `1.0.0`, etc. [Read more about semver](https://docs.npmjs.com/about-semantic-versioning).
188
188
  |`filters`| [String] | A list of modules containing functions that can be used as Nunjucks filters. In case of external modules, remember they need to be added as a dependency in `package.json` of your template.
189
189
  |`hooks`| Object[String, String] or Object[String, Array[String]] | A list of modules containing hooks, except of the ones you keep locally in your template in default location. For each module you must specify exact name of the hook that should be used in the template. For single hook you can specify it as a string, for more you must pass an array of strings. In case of external modules, remember they need to be added as a dependency in `package.json` of your template.
190
190
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asyncapi/generator",
3
- "version": "1.9.2",
3
+ "version": "1.9.5",
4
4
  "description": "The AsyncAPI generator. It can generate documentation, code, anything!",
5
5
  "main": "./lib/generator.js",
6
6
  "bin": {
@@ -51,7 +51,7 @@
51
51
  "@asyncapi/avro-schema-parser": "^1.0.0",
52
52
  "@asyncapi/generator-react-sdk": "^0.2.23",
53
53
  "@asyncapi/openapi-schema-parser": "^2.0.1",
54
- "@asyncapi/parser": "^1.14.0",
54
+ "@asyncapi/parser": "^1.15.1",
55
55
  "@asyncapi/raml-dt-schema-parser": "^2.0.1",
56
56
  "@npmcli/arborist": "^2.2.4",
57
57
  "ajv": "^6.10.2",