Skip to content

Commit

Permalink
fix: Style checks (springwolf#71)
Browse files Browse the repository at this point in the history
* fix: Style checks

As per README.md we use `valve` to check the documentation style. Sadly this validation
was not really working (see https://github.com/springwolf/springwolf.github.io/pull/70/checks for an example)

This MR adds the style files and fixes the documentation to pass, using a new accept.txt file

* fix: Microsoft styles are automatically downloaded

Since Microsoft styles seem to be automatically downloaded, there is no need to push them.

---------

Co-authored-by: carlos.tasada <[email protected]>
  • Loading branch information
ctasada and carlos.tasada authored Apr 9, 2024
1 parent 57075de commit 39261a4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .github/styles/config/vocabularies/Springwolf/accept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
AMQP
[Aa]uto-detect
[Aa]uto-detected
[Aa]uto-detection
auto-generated
Avro
APIs
Baeldung
declaratively
Gradle
Protobuf
Springfox
Springwolf
UI
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.github/styles
.github/styles/Microsoft
node_modules
.docusaurus
build/**
Expand Down
2 changes: 1 addition & 1 deletion docs/behind-the-scenes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Using `swagger-core` any class can be converted into an OpenApi schema.
The schema is [mapped into an AsyncAPI schema](https://www.asyncapi.com/docs/tutorials/getting-started/coming-from-openapi) and included in the AsyncAPI document.
Additionally, Springwolf generates an example based on the provided schema.

By using `swagger-parser`, all the `@Schema` and other swagger annotations are supported as well as `@JsonProperty` through the use of the objectmapper.
By using `swagger-parser`, all the `@Schema` and other swagger annotations are supported as well as `@JsonProperty` through the use of the ObjectMapper.

### ModelConverters
ModelConverters provide a way to improve documentation for classes, which can't be modified, for example because they're part of an external library.
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The following table contains additional properties that can be specified in the
| `springwolf.plugin.jms.scanner.jms-listener.enabled` | `true` | Enable scanner to find methods annotated with `@JmsListener`. |
| **Kafka** | | |
| `springwolf.plugin.kafka.publishing.enabled` | `false` | Allow (anyone) to produce Kafka messages from the UI. *Note that this has security implications* |
| `springwolf.plugin.kafka.publishing.producer` | `null` | Configure the Kafka producer used to publish messages from the UI. Uses identical parameters as `spring.kafka.producer`. [SpringwolfKafkaProducer](https://github.com/springwolf/springwolf-core/blob/b7c7fa508daf3e9c887eb8924cef78af4ed4de1f/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/example/kafka/configuration/CustomSpringwolfKafkaProducer.java#L20) demonstrates multiple producer configuration to publish to avro and protobuf. |
| `springwolf.plugin.kafka.publishing.producer` | `null` | Configure the Kafka producer used to publish messages from the UI. Uses identical parameters as `spring.kafka.producer`. [SpringwolfKafkaProducer](https://github.com/springwolf/springwolf-core/blob/b7c7fa508daf3e9c887eb8924cef78af4ed4de1f/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/example/kafka/configuration/CustomSpringwolfKafkaProducer.java#L20) demonstrates multiple producer configuration to publish to Avro and Protobuf. |
| `springwolf.plugin.kafka.scanner.kafka-listener.enabled` | `true` | Enable scanner to find methods annotated with `@KafkaListener`. |
| **SNS** | | |
| `springwolf.plugin.sns.publishing.enabled` | `false` | Allow (anyone) to produce SNS messages from the UI. *Note that this has security implications* |
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration/documenting-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ The Channel Bindings Object is used to describe the Google Cloud Pub/Sub Topic d
lastRevisionId = "lastRevisionId",
name = "projects/{project}/schemas/{schema}"))
```
`MessageRetentionDuration`: Indicates the minimum duration to retain a message after it is published to the topic
`MessageRetentionDuration`: Indicates the minimum duration to retain a message after it's published to the topic

`Message Storage Policy`: The Message Storage Policy Object is used to describe the Google Cloud Pub/Sub MessageStoragePolicy.
- A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage
Expand All @@ -141,15 +141,15 @@ The Channel Bindings Object is used to describe the Google Cloud Pub/Sub Topic d
- lastRevisionId: The maximum (inclusive) revision allowed for validating messages
- name: The name of the schema that messages published should be validated against (The format is `projects/{project}/schemas/{schema}`.)
#### Message Binding Object
The Message Binding Object is used to describe the Google Cloud Pub/Sub PubsubMessage details, alongside with pertintent parts of the Google Cloud Pub/Sub Schema Object.
The Message Binding Object is used to describe the Google Cloud Pub/Sub PubsubMessage details, alongside with pertinent parts of the Google Cloud Pub/Sub Schema Object.
```java
@GooglePubSubAsyncMessageBinding(
orderingKey = "key",
schema = @GooglePubSubAsyncMessageSchema(name = "projects/{project}/schemas/{schema}"))
```
`OrderingKey`: If non-empty, identifies related messages for which publish order should be respected

`Schema Definition`: The Schema Definition Object is used to describe the Google Cloud Pub/Sub Schema Object with AsyncAPI. While some of this information could be, or is, described using native AsyncAPI, for consistency it makes sense to provide this information here at all times, especially for cases where AsyncAPI does not natively support describing payloads using a supported Google Cloud Pub/Sub schema format like Protobuf
`Schema Definition`: The Schema Definition Object is used to describe the Google Cloud Pub/Sub Schema Object with AsyncAPI. While some of this information could be, or is, described using native AsyncAPI, for consistency it makes sense to provide this information here at all times, especially for cases where AsyncAPI doesn't natively support describing payloads using a supported Google Cloud Pub/Sub schema format like Protobuf
- name: The name of the schema


Expand Down

0 comments on commit 39261a4

Please sign in to comment.