collab: Add the ability to filter extensions by what they provide (#24315)
This PR adds the ability to filter extension results from the extension API by the features that they provide. For instance, to filter down just to extensions that provide icon themes: ``` https://api.zed.dev/extensions?provides=icon-themes ``` Release Notes: - N/A
This commit is contained in:
parent
c0dd7e8367
commit
e1919b4121
4 changed files with 85 additions and 11 deletions
|
@ -1,8 +1,9 @@
|
|||
use std::collections::BTreeSet;
|
||||
use std::sync::Arc;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
use strum::EnumString;
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Debug, PartialEq)]
|
||||
pub struct ExtensionApiManifest {
|
||||
|
@ -17,8 +18,11 @@ pub struct ExtensionApiManifest {
|
|||
pub provides: BTreeSet<ExtensionProvides>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Serialize, Deserialize)]
|
||||
#[derive(
|
||||
Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Serialize, Deserialize, EnumString,
|
||||
)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
#[strum(serialize_all = "kebab-case")]
|
||||
pub enum ExtensionProvides {
|
||||
Themes,
|
||||
IconThemes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue