aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Edgecumbe <git@esotericnonsense.com>2019-10-27 03:33:36 +0100
committerDaniel Edgecumbe <git@esotericnonsense.com>2019-10-27 03:33:36 +0100
commitfb9638391529577f32be9b2d19e89d93b5aa734c (patch)
treef2b4111ab7bdfe37d40e81e408f9f2df9c057ad1
parentb4d0a5ddc02eeb44a38ff342d1799f56a4fe739a (diff)
Add doc headers to the generated files
-rwxr-xr-xgenapi/main.py18
-rw-r--r--src/generated_methods.rs10
-rw-r--r--src/generated_requests.rs10
-rw-r--r--src/generated_types.rs10
4 files changed, 28 insertions, 20 deletions
diff --git a/genapi/main.py b/genapi/main.py
index 8dad33d..2e92f1b 100755
--- a/genapi/main.py
+++ b/genapi/main.py
@@ -673,9 +673,13 @@ def main() -> None:
# print(aping.to_json())
header = [
- "// This file has been automatically generated by botfair",
- "// from the Betfair APING documentation at",
- "// https://docs.developer.betfair.com",
+ "//! # automatically generated",
+ "//! This module has been automatically generated by botfair",
+ "//! from the Betfair APING documentation at",
+ "//! https://docs.developer.betfair.com",
+ "//!",
+ "//! Any documentation here has been generated directly from the API",
+ "//! docs.",
"",
]
@@ -736,14 +740,6 @@ def main() -> None:
for l in rust_operations.request_structs:
f.write(l + "\n")
- # print("#![allow(unused_variables)]")
- # print("#![allow(dead_code)]")
-
- # TODO this stuff goes in the non included file I guess
-
- # print("use crate::json_rpc::RpcRequest;")
- # print("use crate::Result;")
-
if __name__ == "__main__":
main()
diff --git a/src/generated_methods.rs b/src/generated_methods.rs
index 6015951..3b5a07b 100644
--- a/src/generated_methods.rs
+++ b/src/generated_methods.rs
@@ -1,6 +1,10 @@
-// This file has been automatically generated by botfair
-// from the Betfair APING documentation at
-// https://docs.developer.betfair.com
+//! # automatically generated
+//! This module has been automatically generated by botfair
+//! from the Betfair APING documentation at
+//! https://docs.developer.betfair.com
+//!
+//! Any documentation here has been generated directly from the API
+//! docs.
#![allow(non_snake_case)]
use crate::generated_requests::*;
diff --git a/src/generated_requests.rs b/src/generated_requests.rs
index 372e2e8..448b810 100644
--- a/src/generated_requests.rs
+++ b/src/generated_requests.rs
@@ -1,6 +1,10 @@
-// This file has been automatically generated by botfair
-// from the Betfair APING documentation at
-// https://docs.developer.betfair.com
+//! # automatically generated
+//! This module has been automatically generated by botfair
+//! from the Betfair APING documentation at
+//! https://docs.developer.betfair.com
+//!
+//! Any documentation here has been generated directly from the API
+//! docs.
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
diff --git a/src/generated_types.rs b/src/generated_types.rs
index 8e1e08b..1118ec2 100644
--- a/src/generated_types.rs
+++ b/src/generated_types.rs
@@ -1,6 +1,10 @@
-// This file has been automatically generated by botfair
-// from the Betfair APING documentation at
-// https://docs.developer.betfair.com
+//! # automatically generated
+//! This module has been automatically generated by botfair
+//! from the Betfair APING documentation at
+//! https://docs.developer.betfair.com
+//!
+//! Any documentation here has been generated directly from the API
+//! docs.
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]