From 39261a4533719ba85b39e1cb4068abed3d78fb06 Mon Sep 17 00:00:00 2001 From: Carlos Tasada Date: Tue, 9 Apr 2024 18:05:01 +0200 Subject: [PATCH] fix: Style checks (#71) * 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 --- .../config/vocabularies/Springwolf/accept.txt | 14 ++++++++++++++ .gitignore | 2 +- docs/behind-the-scenes.md | 2 +- docs/configuration/configuration.mdx | 2 +- docs/configuration/documenting-bindings.md | 6 +++--- 5 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 .github/styles/config/vocabularies/Springwolf/accept.txt diff --git a/.github/styles/config/vocabularies/Springwolf/accept.txt b/.github/styles/config/vocabularies/Springwolf/accept.txt new file mode 100644 index 0000000..c86976f --- /dev/null +++ b/.github/styles/config/vocabularies/Springwolf/accept.txt @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 341f672..91418e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.github/styles +.github/styles/Microsoft node_modules .docusaurus build/** diff --git a/docs/behind-the-scenes.md b/docs/behind-the-scenes.md index df7da96..b440dc1 100644 --- a/docs/behind-the-scenes.md +++ b/docs/behind-the-scenes.md @@ -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. diff --git a/docs/configuration/configuration.mdx b/docs/configuration/configuration.mdx index 6a514ba..b7d1b6e 100644 --- a/docs/configuration/configuration.mdx +++ b/docs/configuration/configuration.mdx @@ -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* | diff --git a/docs/configuration/documenting-bindings.md b/docs/configuration/documenting-bindings.md index e9071dd..2cd233f 100644 --- a/docs/configuration/documenting-bindings.md +++ b/docs/configuration/documenting-bindings.md @@ -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 @@ -141,7 +141,7 @@ 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", @@ -149,7 +149,7 @@ The Message Binding Object is used to describe the Google Cloud Pub/Sub PubsubMe ``` `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