Skip to content

Commit 57e338c

Browse files
author
carlos.tasada
committed
Added linting to MDX files
1 parent 4974d58 commit 57e338c

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

.markdownxlint.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": ".markdownlint.json",
3+
4+
"first-line-heading": false,
5+
"no-bare-urls": false,
6+
"no-inline-html": false
7+
}

docs/configuration/configuration.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,14 @@ The following table contains additional properties that can be specified in the
8080
| `springwolf.plugin.sqs.publishing.enabled` | `false` | Allow (anyone) to produce SQS messages from the UI. *Note that this has security implications* |
8181
| `springwolf.plugin.sqs.scanner.sqs-listener.enabled` | `true` | Enable scanner to find methods annotated with `@SqsListener`. |
8282

83-
84-
8583
## Actuator support
8684

8785
Springwolf supports exposing the AsyncAPI document as part of Spring Boot’s actuator endpoint.
8886
The AsyncAPI document will then be moved underneath actuators base path, that's `/actuator/springwolf/docs.json` or `/actuator/springwolf/docs.yaml` respectively.
8987

9088
To enable it, add the `spring-boot-actuator` dependency first.
9189
Second, enable the actuator endpoint in the `application.properties` file:
90+
9291
```properties
9392
# Move Springwolf endpoint to actuator
9493
springwolf.endpoint.actuator.enabled=true

docs/configuration/documenting-messages.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Springwolf provides different ways to document the messages. The `message` is pa
1717
A message can be defined as part of the `@AsyncOperation` annotation, using `message = @AsyncMessage()` field.
1818

1919
For example:
20+
2021
```java
2122
@AsyncPublisher(operation = @AsyncOperation(
2223
channelName = "example-producer-topic",
@@ -39,6 +40,7 @@ public void sendMessage(ExamplePayloadDto msg) {
3940
Springwolf tries to auto-detect the payload type based on the method signature.
4041

4142
When the method has multiple arguments, the payload can be indicated via `@Payload`, that's
43+
4244
```java
4345
public void sendMessage(@Payload ExamplePayloadDto msg, String traceId, Object loggingContext) {}
4446
```
@@ -62,7 +64,6 @@ First, the base property `springwolf.payload.extractable-classes`.
6264
Second, the canonical class name, `java.util.function.Function` in this case.
6365
And third, the generic parameter index (`1`).
6466

65-
6667
## Schema
6768

6869
Under the hood Springwolf relies on swagger-core `ModelConverters` to define the message schema.

docs/quickstart.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Add the following dependencies:
2525
</Tabs>
2626

2727
Latest version: ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-core?color=green&label=springwolf&style=plastic)
28+
2829
## 2. Configure properties
2930

3031
Add the following to your application.properties:
@@ -42,7 +43,9 @@ springwolf.docket.servers.kafka.url=${kafka.bootstrap.servers:localhost:29092}
4243
*Make sure to change the value of `springwolf.docket.base-package` to the package containing your listeners, so that Springwolf will automatically pick them up.*
4344

4445
## 3. View the docs
46+
4547
Start the application and open the URLs in your browser:
48+
4649
- JSON: [`<host>:<port>/springwolf/docs`](http://localhost:8080/springwolf/docs)
4750
- YAML: [`<host>:<port>/springwolf/docs.yaml`](http://localhost:8080/springwolf/docs.yaml)
4851
- UI: [`<host>:<port>/springwolf/asyncapi-ui.html`](http://localhost:8080/springwolf/asyncapi-ui.html)

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"serve": "docusaurus serve",
1313
"lint:md": "markdownlint --ignore node_modules/ \"./docs/**/*.md\"",
1414
"lint:md:fix": "markdownlint --fix --ignore node_modules/ \"./docs/**/*.md\"",
15+
"lint:mdx": "markdownlint --config .markdownxlint.json --ignore node_modules/ \"./docs/**/*.mdx\"",
16+
"lint:mdx:fix": "markdownlint --config .markdownxlint.json --fix --ignore node_modules/ \"./docs/**/*.mdx\"",
1517
"write-translations": "docusaurus write-translations",
1618
"write-heading-ids": "docusaurus write-heading-ids"
1719
},

0 commit comments

Comments
 (0)