Skip to content

Commit

Permalink
feat: added openapi operations to apis list and enabled movement in a…
Browse files Browse the repository at this point in the history
…pis list ✨
  • Loading branch information
zaghaghi committed Mar 3, 2024
1 parent e9d8bfa commit 42f2d60
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
.data/*.log
.vscode/
.vscode/
openapi.json
111 changes: 110 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ json5 = "0.4.1"
lazy_static = "1.4.0"
libc = "0.2.148"
log = "0.4.20"
oas3 = "0.4.0"
pretty_assertions = "1.4.0"
ratatui = { version = "0.26.0", features = ["serde", "macros"] }
serde = { version = "1.0.188", features = ["derive"] }
Expand All @@ -35,6 +36,8 @@ tokio-util = "0.7.9"
tracing = "0.1.37"
tracing-error = "0.2.0"
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "serde"] }
tui-input = "0.8.0"
tui-textarea = "0.4.0"

[build-dependencies]
vergen = { version = "8.2.6", features = [ "build", "git", "gitoxide", "cargo" ]}
1 change: 1 addition & 0 deletions examples/petstore.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ pub enum Action {
Error(String),
Help,
Focus(Pane),
Up,
Down,
}
4 changes: 1 addition & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub enum Mode {

pub struct App {
pub config: Config,
pub openapi_path: String,
pub components: Vec<Box<dyn Component>>,
pub should_quit: bool,
pub should_suspend: bool,
Expand All @@ -24,7 +23,7 @@ pub struct App {

impl App {
pub fn new(openapi_path: String) -> Result<Self> {
let home = Home::new();
let home = Home::new(openapi_path);
let config = Config::new()?;
let mode = Mode::Home;
Ok(Self {
Expand All @@ -33,7 +32,6 @@ impl App {
should_suspend: false,
config,
mode,
openapi_path,
last_tick_key_events: Vec::new(),
})
}
Expand Down
Loading

0 comments on commit 42f2d60

Please sign in to comment.