Skip to content

Commit 3ea1724

Browse files
authored
docs(apidoc): transform Go map syntax to JSON-like format (#39)
Transform Go map representation (map[key:value]) to JSON-like syntax ({key:value }) in generated API documentation, making default values more intuitive for users unfamiliar with Go. This change applies the fix from cloudnative-pg/cloudnative-pg#9777 to all versioned documentation (1.25, 1.26, 1.27, 1.28) and the development version. The specific change transforms the replicationSlots default value from: ``` \{ highAvailability:map[enabled:true] \} ``` to: ``` \{ highAvailability\: \{ enabled:true \} \} ``` This resolves Docusaurus v3 rendering issues where the `:map` portion was being misinterpreted as a Markdown directive and removed from the rendered output. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
1 parent 5f8b45c commit 3ea1724

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

website/docs/cloudnative-pg.v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ _Appears in:_
576576
| `minSyncReplicas` _integer_ | Minimum number of instances required in synchronous replication with the<br />primary. Undefined or 0 allow writes to complete when no standby is<br />available. | | 0 | Minimum: 0 <br /> |
577577
| `maxSyncReplicas` _integer_ | The target value for the synchronous replication quorum, that can be<br />decreased if the number of ready standbys is lower than this.<br />Undefined or 0 disable synchronous replication. | | 0 | Minimum: 0 <br /> |
578578
| `postgresql` _[PostgresConfiguration](#postgresconfiguration)_ | Configuration of the PostgreSQL server | | | |
579-
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability:map[enabled:true] \} | |
579+
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability\: \{ enabled:true \} \} | |
580580
| `bootstrap` _[BootstrapConfiguration](#bootstrapconfiguration)_ | Instructions to bootstrap this cluster | | | |
581581
| `replica` _[ReplicaClusterConfiguration](#replicaclusterconfiguration)_ | Replica cluster configuration | | | |
582582
| `superuserSecret` _[LocalObjectReference](https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api#LocalObjectReference)_ | The secret containing the superuser password. If not defined a new<br />secret will be created with a randomly generated password | | | |

website/versioned_docs/version-1.25/cloudnative-pg.v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ _Appears in:_
572572
| `minSyncReplicas` _integer_ | Minimum number of instances required in synchronous replication with the<br />primary. Undefined or 0 allow writes to complete when no standby is<br />available. | | 0 | Minimum: 0 <br /> |
573573
| `maxSyncReplicas` _integer_ | The target value for the synchronous replication quorum, that can be<br />decreased if the number of ready standbys is lower than this.<br />Undefined or 0 disable synchronous replication. | | 0 | Minimum: 0 <br /> |
574574
| `postgresql` _[PostgresConfiguration](#postgresconfiguration)_ | Configuration of the PostgreSQL server | | | |
575-
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability:map[enabled:true] \} | |
575+
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability\: \{ enabled:true \} \} | |
576576
| `bootstrap` _[BootstrapConfiguration](#bootstrapconfiguration)_ | Instructions to bootstrap this cluster | | | |
577577
| `replica` _[ReplicaClusterConfiguration](#replicaclusterconfiguration)_ | Replica cluster configuration | | | |
578578
| `superuserSecret` _[LocalObjectReference](https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api#LocalObjectReference)_ | The secret containing the superuser password. If not defined a new<br />secret will be created with a randomly generated password | | | |

website/versioned_docs/version-1.26/cloudnative-pg.v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ _Appears in:_
573573
| `minSyncReplicas` _integer_ | Minimum number of instances required in synchronous replication with the<br />primary. Undefined or 0 allow writes to complete when no standby is<br />available. | | 0 | Minimum: 0 <br /> |
574574
| `maxSyncReplicas` _integer_ | The target value for the synchronous replication quorum, that can be<br />decreased if the number of ready standbys is lower than this.<br />Undefined or 0 disable synchronous replication. | | 0 | Minimum: 0 <br /> |
575575
| `postgresql` _[PostgresConfiguration](#postgresconfiguration)_ | Configuration of the PostgreSQL server | | | |
576-
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability:map[enabled:true] \} | |
576+
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability\: \{ enabled:true \} \} | |
577577
| `bootstrap` _[BootstrapConfiguration](#bootstrapconfiguration)_ | Instructions to bootstrap this cluster | | | |
578578
| `replica` _[ReplicaClusterConfiguration](#replicaclusterconfiguration)_ | Replica cluster configuration | | | |
579579
| `superuserSecret` _[LocalObjectReference](https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api#LocalObjectReference)_ | The secret containing the superuser password. If not defined a new<br />secret will be created with a randomly generated password | | | |

website/versioned_docs/version-1.27/cloudnative-pg.v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ _Appears in:_
574574
| `minSyncReplicas` _integer_ | Minimum number of instances required in synchronous replication with the<br />primary. Undefined or 0 allow writes to complete when no standby is<br />available. | | 0 | Minimum: 0 <br /> |
575575
| `maxSyncReplicas` _integer_ | The target value for the synchronous replication quorum, that can be<br />decreased if the number of ready standbys is lower than this.<br />Undefined or 0 disable synchronous replication. | | 0 | Minimum: 0 <br /> |
576576
| `postgresql` _[PostgresConfiguration](#postgresconfiguration)_ | Configuration of the PostgreSQL server | | | |
577-
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability:map[enabled:true] \} | |
577+
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability\: \{ enabled:true \} \} | |
578578
| `bootstrap` _[BootstrapConfiguration](#bootstrapconfiguration)_ | Instructions to bootstrap this cluster | | | |
579579
| `replica` _[ReplicaClusterConfiguration](#replicaclusterconfiguration)_ | Replica cluster configuration | | | |
580580
| `superuserSecret` _[LocalObjectReference](https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api#LocalObjectReference)_ | The secret containing the superuser password. If not defined a new<br />secret will be created with a randomly generated password | | | |

website/versioned_docs/version-1.28/cloudnative-pg.v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ _Appears in:_
574574
| `minSyncReplicas` _integer_ | Minimum number of instances required in synchronous replication with the<br />primary. Undefined or 0 allow writes to complete when no standby is<br />available. | | 0 | Minimum: 0 <br /> |
575575
| `maxSyncReplicas` _integer_ | The target value for the synchronous replication quorum, that can be<br />decreased if the number of ready standbys is lower than this.<br />Undefined or 0 disable synchronous replication. | | 0 | Minimum: 0 <br /> |
576576
| `postgresql` _[PostgresConfiguration](#postgresconfiguration)_ | Configuration of the PostgreSQL server | | | |
577-
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability:map[enabled:true] \} | |
577+
| `replicationSlots` _[ReplicationSlotsConfiguration](#replicationslotsconfiguration)_ | Replication slots management configuration | | \{ highAvailability\: \{ enabled:true \} \} | |
578578
| `bootstrap` _[BootstrapConfiguration](#bootstrapconfiguration)_ | Instructions to bootstrap this cluster | | | |
579579
| `replica` _[ReplicaClusterConfiguration](#replicaclusterconfiguration)_ | Replica cluster configuration | | | |
580580
| `superuserSecret` _[LocalObjectReference](https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api#LocalObjectReference)_ | The secret containing the superuser password. If not defined a new<br />secret will be created with a randomly generated password | | | |

0 commit comments

Comments
 (0)