-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from Klebert-Engineering/feature/use-zserio-2.…
…3.0-final Use final zserio 2.3.0
- Loading branch information
Showing
11 changed files
with
302 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,16 +126,16 @@ def config_for_method(self, method_name: str) -> Tuple[str, OAParamLocation, boo | |
return self.config["*"] | ||
|
||
def generate(self): | ||
service_name_parts = self.service_instance.SERVICE_FULL_NAME.split(".") | ||
service_name_parts = self.service_instance.service_full_name.split(".") | ||
schema = { | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": ".".join(service_name_parts[1:]), | ||
"description": md_filter_definition(get_doc_str( | ||
ident_type=IdentType.SERVICE, | ||
pkg_path=self.zs_pkg_path, | ||
ident=self.service_instance.SERVICE_FULL_NAME, | ||
fallback=[f"REST API for {self.service_instance.SERVICE_FULL_NAME}"] | ||
ident=self.service_instance.service_full_name, | ||
fallback=[f"REST API for {self.service_instance.service_full_name}"] | ||
)[0]), | ||
"contact": { | ||
"email": "[email protected]" | ||
|
@@ -169,7 +169,7 @@ def generate(self): | |
}, | ||
} for method_info in ( | ||
self.generate_method_info(method_name) | ||
for method_name in self.service_instance.METHOD_NAMES) | ||
for method_name in self.service_instance.method_names) | ||
} | ||
} | ||
yaml.dump(schema, self.output, default_flow_style=False) | ||
|
@@ -182,7 +182,7 @@ def generate_method_info(self, method_name: str) -> MethodSchemaInfo: | |
doc_strings = get_doc_str( | ||
ident_type=IdentType.RPC, | ||
pkg_path=self.zs_pkg_path, | ||
ident=f"{self.service_instance.SERVICE_FULL_NAME}.{method_name}") | ||
ident=f"{self.service_instance.service_full_name}.{method_name}") | ||
if doc_strings: | ||
result.docstring = doc_strings[0] | ||
result.returntype = doc_strings[1] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.