Skip to content

Commit

Permalink
fix(codegen): generate terminal resource objects
Browse files Browse the repository at this point in the history
Was trying to generate a terminal connection token, but codegen
incorrectly uses terminal as an object (instead of as a resource), leading to requests for terminal
objects (like terminal.connection_token) being mislabeled in the map,
and those objects not being found when it came time to generate impl's
for their requests
  • Loading branch information
dgramop committed Jan 24, 2024
1 parent 8d799cd commit bf7e117
Show file tree
Hide file tree
Showing 5 changed files with 720 additions and 4 deletions.
3 changes: 3 additions & 0 deletions openapi/src/metadata.rs
Expand Up @@ -209,6 +209,9 @@ pub fn metadata_requests<'a>(
// special case for usage_records
(_, _, Some("usage_records")) => "usage_records".to_string(),

// special case: terminal is a resource, not an object
(Some("terminal"), Some(x), _) => format!("terminal.{}", x),

(Some(x), _, _) => x.to_string(),
_ => {
// this should never happen
Expand Down

0 comments on commit bf7e117

Please sign in to comment.