My aggregated monorepo of OCaml code, automaintained

Fix odoc errors in documentation

- Fix ambiguous {!decode} and {!connection} references by using val- prefix
- Add section IDs to header_parsing.mli and fix cross-references to sections
- Escape curly braces in documentation examples to avoid bad markup errors
- Fix unpaired brace in URL reference in headers.mli
- Indent verbatim block content in mqtte_cmd.mli

Unresolved references to external libraries (Jsont, Tomlt_bytesrw, etc.)
are intentionally kept as cross-references for future resolution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+39 -39
+1 -1
ocaml-cbort/lib/cbort.mli
··· 385 385 (** [decode_string c s] decodes from CBOR bytes [s]. *) 386 386 387 387 val decode_exn : 'a t -> Bytes.Reader.t -> 'a 388 - (** [decode_exn c r] is like {!decode} but raises {!Error.Decode}. *) 388 + (** [decode_exn c r] is like {!val-decode} but raises {!Error.Decode}. *) 389 389 390 390 val decode_string_exn : 'a t -> string -> 'a 391 391 (** [decode_string_exn c s] is like {!decode_string} but raises. *)
+1 -1
ocaml-conpool/lib/conpool.mli
··· 162 162 val connection_with_info : sw:Eio.Switch.t -> t -> Endpoint.t -> connection_with_info 163 163 (** [connection_with_info ~sw pool endpoint] acquires a connection with TLS info. 164 164 165 - Like {!connection}, but returns a record containing both the connection flow 165 + Like {!val-connection}, but returns a record containing both the connection flow 166 166 and TLS epoch data (if the connection uses TLS). 167 167 168 168 This is useful for protocols that need access to TLS session information,
+14 -14
ocaml-mqtte/lib/cmd/mqtte_cmd.mli
··· 25 25 26 26 Example configuration file: 27 27 {v 28 - [mqtt] 29 - host = "mqtt.example.com" 30 - port = 8883 31 - tls = true 32 - client_id = "my-client" 33 - clean_session = true 34 - keep_alive = 60 35 - username = "user" 36 - password = "secret" 37 - protocol_version = "5.0" 28 + [mqtt] 29 + host = "mqtt.example.com" 30 + port = 8883 31 + tls = true 32 + client_id = "my-client" 33 + clean_session = true 34 + keep_alive = 60 35 + username = "user" 36 + password = "secret" 37 + protocol_version = "5.0" 38 38 39 - [pool] 40 - min_connections = 1 41 - max_connections = 10 42 - idle_timeout = 300.0 39 + [pool] 40 + min_connections = 1 41 + max_connections = 10 42 + idle_timeout = 300.0 43 43 v} *) 44 44 45 45 (** {1 Connection Options} *)
+22 -22
ocaml-requests/lib/header_parsing.mli
··· 10 10 11 11 {2 Supported Headers} 12 12 13 - - {!Content-Range} - Partial content range specification (RFC 9110 Section 14.4) 14 - - {!If-Range} - Conditional range request (RFC 9110 Section 13.1.5) 15 - - {!Allow} - Supported HTTP methods (RFC 9110 Section 10.2.1) 16 - - {!Authentication-Info} - Post-authentication info (RFC 9110 Section 11.6.3) 17 - - {!Retry-After} - Retry delay specification (RFC 9110 Section 10.2.3) 18 - - {!Accept-Ranges} - Range support indication (RFC 9110 Section 14.3) 19 - - {!Cache-Status} - Cache handling indication (RFC 9211) 20 - - {!Content-Digest} / {!Repr-Digest} - Body integrity verification (RFC 9530) 21 - - {!Strict-Transport-Security} - HSTS policy (RFC 6797) 13 + - {{!section-content_range}Content-Range} - Partial content range specification (RFC 9110 Section 14.4) 14 + - {{!section-if_range}If-Range} - Conditional range request (RFC 9110 Section 13.1.5) 15 + - {{!section-allow}Allow} - Supported HTTP methods (RFC 9110 Section 10.2.1) 16 + - {{!section-authentication_info}Authentication-Info} - Post-authentication info (RFC 9110 Section 11.6.3) 17 + - {{!section-retry_after}Retry-After} - Retry delay specification (RFC 9110 Section 10.2.3) 18 + - {{!section-accept_ranges}Accept-Ranges} - Range support indication (RFC 9110 Section 14.3) 19 + - {{!section-cache_status}Cache-Status} - Cache handling indication (RFC 9211) 20 + - {{!section-content_digest}Content-Digest / Repr-Digest} - Body integrity verification (RFC 9530) 21 + - {{!section-hsts}Strict-Transport-Security} - HSTS policy (RFC 6797) 22 22 23 23 @see <https://www.rfc-editor.org/rfc/rfc9110> RFC 9110: HTTP Semantics 24 24 @see <https://www.rfc-editor.org/rfc/rfc9211> RFC 9211: Cache-Status 25 25 @see <https://www.rfc-editor.org/rfc/rfc9530> RFC 9530: Digest Fields 26 26 @see <https://www.rfc-editor.org/rfc/rfc6797> RFC 6797: HTTP Strict Transport Security *) 27 27 28 - (** {1 Content-Range (RFC 9110 Section 14.4)} 28 + (** {1:content_range Content-Range (RFC 9110 Section 14.4)} 29 29 30 30 The Content-Range header indicates which part of a representation is 31 31 enclosed when a 206 (Partial Content) response is returned. ··· 52 52 Returns [None] if the value cannot be parsed. 53 53 54 54 Examples: 55 - - ["bytes 0-499/1234"] -> Some {unit="bytes"; range=Some(0,499); complete_length=Some 1234} 56 - - ["bytes */1234"] -> Some {unit="bytes"; range=None; complete_length=Some 1234} *) 55 + - ["bytes 0-499/1234"] -> [Some \{unit="bytes"; range=Some(0,499); complete_length=Some 1234\}] 56 + - ["bytes */1234"] -> [Some \{unit="bytes"; range=None; complete_length=Some 1234\}] *) 57 57 58 58 val make_content_range : start:int64 -> end_:int64 -> complete_length:int64 -> content_range 59 59 (** [make_content_range ~start ~end_ ~complete_length] creates a Content-Range ··· 67 67 (** [make_unsatisfied_range ~complete_length] creates a Content-Range value for 68 68 an unsatisfied range (416 response). *) 69 69 70 - (** {1 If-Range (RFC 9110 Section 13.1.5)} 70 + (** {1:if_range If-Range (RFC 9110 Section 13.1.5)} 71 71 72 72 The If-Range header makes a Range request conditional. It can contain 73 73 either an ETag or a Last-Modified date. ··· 101 101 val if_range_is_date : if_range -> bool 102 102 (** [if_range_is_date ir] returns [true] if [ir] is a date. *) 103 103 104 - (** {1 Allow (RFC 9110 Section 10.2.1)} 104 + (** {1:allow Allow (RFC 9110 Section 10.2.1)} 105 105 106 106 The Allow header lists the set of methods supported by the target resource. 107 107 ··· 120 120 val allow_contains : Method.t -> string -> bool 121 121 (** [allow_contains method_ allow_value] checks if a method is in an Allow header value. *) 122 122 123 - (** {1 Authentication-Info (RFC 9110 Section 11.6.3)} 123 + (** {1:authentication_info Authentication-Info (RFC 9110 Section 11.6.3)} 124 124 125 125 The Authentication-Info header is sent by the server after successful 126 126 authentication. For Digest authentication, it provides: ··· 158 158 val get_nextnonce : authentication_info -> string option 159 159 (** [get_nextnonce info] returns the next nonce, if present. *) 160 160 161 - (** {1 Retry-After (RFC 9110 Section 10.2.3)} 161 + (** {1:retry_after Retry-After (RFC 9110 Section 10.2.3)} 162 162 163 163 The Retry-After header indicates how long to wait before retrying. 164 164 ··· 185 185 186 186 @param now The current time as a Unix timestamp (for date calculation) *) 187 187 188 - (** {1 Accept-Ranges (RFC 9110 Section 14.3)} 188 + (** {1:accept_ranges Accept-Ranges (RFC 9110 Section 14.3)} 189 189 190 190 The Accept-Ranges header indicates whether the server supports range requests. 191 191 ··· 209 209 val supports_byte_ranges : accept_ranges -> bool 210 210 (** [supports_byte_ranges ar] returns [true] if byte range requests are supported. *) 211 211 212 - (** {1 Cache-Status (RFC 9211)} 212 + (** {1:cache_status Cache-Status (RFC 9211)} 213 213 214 214 The Cache-Status header field indicates how caches have handled a request. 215 215 It is a List structured field (RFC 8941) where each member is a cache ··· 291 291 (** [cache_status_get_fwd entries] returns the forward reason from the first 292 292 cache that forwarded the request, if any. *) 293 293 294 - (** {1 Content-Digest / Repr-Digest (RFC 9530)} 294 + (** {1:content_digest Content-Digest / Repr-Digest (RFC 9530)} 295 295 296 296 Content-Digest contains a digest of the content (after content coding). 297 297 Repr-Digest contains a digest of the representation (before content coding). ··· 358 358 (** [get_strongest_digest digests] returns the strongest available digest. 359 359 Prefers SHA-512 over SHA-256 over others. *) 360 360 361 - (** {1 Strict-Transport-Security (RFC 6797)} 361 + (** {1:hsts Strict-Transport-Security (RFC 6797)} 362 362 363 363 The Strict-Transport-Security (HSTS) header tells browsers to only 364 364 access the site over HTTPS, protecting against protocol downgrade ··· 384 384 Returns [None] if the required max-age directive is missing. 385 385 386 386 Example: ["max-age=31536000; includeSubDomains"] -> 387 - Some {max_age=31536000; include_subdomains=true; preload=false} *) 387 + [Some \{max_age=31536000; include_subdomains=true; preload=false\}] *) 388 388 389 389 val hsts_to_string : hsts -> string 390 390 (** [hsts_to_string hsts] formats an HSTS value as a header string. 391 391 392 - Example: {max_age=31536000; include_subdomains=true; preload=false} -> 392 + Example: [\{max_age=31536000; include_subdomains=true; preload=false\}] -> 393 393 ["max-age=31536000; includeSubDomains"] *) 394 394 395 395 val make_hsts : ?max_age:int64 -> ?include_subdomains:bool -> ?preload:bool -> unit -> hsts
+1 -1
ocaml-requests/lib/headers.mli
··· 284 284 285 285 (** {1 Connection Header Handling} 286 286 287 - Per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-7.6.1}RFC 9110 Section 7.6.1}}: 287 + Per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-7.6.1}RFC 9110 Section 7.6.1}: 288 288 The Connection header field lists hop-by-hop header fields that MUST be 289 289 removed before forwarding the message. *) 290 290