remove generate_text (#440)

This commit is contained in:
Adam Leventhal 2023-04-25 21:47:40 -07:00 committed by GitHub
parent b717086ef3
commit 362b6b728a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -504,11 +504,6 @@ impl Generator {
Ok(out) Ok(out)
} }
/// Render text output.
pub fn generate_text(&mut self, spec: &OpenAPI) -> Result<String> {
Ok(self.generate_tokens(spec)?.to_string())
}
// TODO deprecate? // TODO deprecate?
pub fn get_type_space(&self) -> &TypeSpace { pub fn get_type_space(&self) -> &TypeSpace {
&self.type_space &self.type_space

View File

@ -120,7 +120,7 @@ fn main() -> Result<()> {
.with_tag(args.tags.into()), .with_tag(args.tags.into()),
); );
match builder.generate_text(&api) { match builder.generate_tokens(&api) {
Ok(api_code) => { Ok(api_code) => {
let type_space = builder.get_type_space(); let type_space = builder.get_type_space();
@ -188,7 +188,7 @@ fn main() -> Result<()> {
let lib_code = if args.include_client { let lib_code = if args.include_client {
format!("mod progenitor_client;\n\n{}", api_code) format!("mod progenitor_client;\n\n{}", api_code)
} else { } else {
api_code api_code.to_string()
}; };
let lib_code = reformat_code(lib_code); let lib_code = reformat_code(lib_code);