1pub mod comment;
9pub mod issue;
10pub mod response;
11
12
13#[allow(unused_imports)]
14use alloc::collections::BTreeMap;
15
16#[allow(unused_imports)]
17use core::marker::PhantomData;
18use jacquard_common::CowStr;
19
20#[allow(unused_imports)]
21use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
22use jacquard_common::types::collection::{Collection, RecordError};
23use jacquard_common::types::string::{AtUri, Cid, Datetime};
24use jacquard_common::types::uri::{RecordUri, UriError};
25use jacquard_common::xrpc::XrpcResp;
26use jacquard_derive::{IntoStatic, lexicon};
27use jacquard_lexicon::lexicon::LexiconDoc;
28use jacquard_lexicon::schema::LexiconSchema;
29
30#[allow(unused_imports)]
31use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
32use serde::{Serialize, Deserialize};
33use crate::network_slices::tools::Images;
34use crate::network_slices::tools::richtext::facet::Facet;
35
36#[lexicon]
37#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
38#[serde(rename_all = "camelCase", rename = "network.slices.tools.bug", tag = "$type")]
39pub struct Bug<'a> {
40 #[serde(skip_serializing_if = "Option::is_none")]
41 #[serde(borrow)]
42 pub app_used: Option<CowStr<'a>>,
43 #[serde(skip_serializing_if = "Option::is_none")]
44 #[serde(borrow)]
45 pub attachments: Option<Images<'a>>,
46 pub created_at: Datetime,
47 #[serde(borrow)]
48 pub description: CowStr<'a>,
49 #[serde(skip_serializing_if = "Option::is_none")]
51 #[serde(borrow)]
52 pub description_facets: Option<Vec<Facet<'a>>>,
53 #[serde(borrow)]
55 pub namespace: CowStr<'a>,
56 #[serde(borrow)]
57 pub severity: BugSeverity<'a>,
58 #[serde(borrow)]
59 pub steps_to_reproduce: CowStr<'a>,
60 #[serde(skip_serializing_if = "Option::is_none")]
62 #[serde(borrow)]
63 pub steps_to_reproduce_facets: Option<Vec<Facet<'a>>>,
64 #[serde(borrow)]
65 pub title: CowStr<'a>,
66}
67
68
69#[derive(Debug, Clone, PartialEq, Eq, Hash)]
70pub enum BugSeverity<'a> {
71 Cosmetic,
72 Annoying,
73 Broken,
74 Unusable,
75 Other(CowStr<'a>),
76}
77
78impl<'a> BugSeverity<'a> {
79 pub fn as_str(&self) -> &str {
80 match self {
81 Self::Cosmetic => "cosmetic",
82 Self::Annoying => "annoying",
83 Self::Broken => "broken",
84 Self::Unusable => "unusable",
85 Self::Other(s) => s.as_ref(),
86 }
87 }
88}
89
90impl<'a> From<&'a str> for BugSeverity<'a> {
91 fn from(s: &'a str) -> Self {
92 match s {
93 "cosmetic" => Self::Cosmetic,
94 "annoying" => Self::Annoying,
95 "broken" => Self::Broken,
96 "unusable" => Self::Unusable,
97 _ => Self::Other(CowStr::from(s)),
98 }
99 }
100}
101
102impl<'a> From<String> for BugSeverity<'a> {
103 fn from(s: String) -> Self {
104 match s.as_str() {
105 "cosmetic" => Self::Cosmetic,
106 "annoying" => Self::Annoying,
107 "broken" => Self::Broken,
108 "unusable" => Self::Unusable,
109 _ => Self::Other(CowStr::from(s)),
110 }
111 }
112}
113
114impl<'a> core::fmt::Display for BugSeverity<'a> {
115 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
116 write!(f, "{}", self.as_str())
117 }
118}
119
120impl<'a> AsRef<str> for BugSeverity<'a> {
121 fn as_ref(&self) -> &str {
122 self.as_str()
123 }
124}
125
126impl<'a> serde::Serialize for BugSeverity<'a> {
127 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
128 where
129 S: serde::Serializer,
130 {
131 serializer.serialize_str(self.as_str())
132 }
133}
134
135impl<'de, 'a> serde::Deserialize<'de> for BugSeverity<'a>
136where
137 'de: 'a,
138{
139 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
140 where
141 D: serde::Deserializer<'de>,
142 {
143 let s = <&'de str>::deserialize(deserializer)?;
144 Ok(Self::from(s))
145 }
146}
147
148impl<'a> Default for BugSeverity<'a> {
149 fn default() -> Self {
150 Self::Other(Default::default())
151 }
152}
153
154impl jacquard_common::IntoStatic for BugSeverity<'_> {
155 type Output = BugSeverity<'static>;
156 fn into_static(self) -> Self::Output {
157 match self {
158 BugSeverity::Cosmetic => BugSeverity::Cosmetic,
159 BugSeverity::Annoying => BugSeverity::Annoying,
160 BugSeverity::Broken => BugSeverity::Broken,
161 BugSeverity::Unusable => BugSeverity::Unusable,
162 BugSeverity::Other(v) => BugSeverity::Other(v.into_static()),
163 }
164 }
165}
166
167#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
170#[serde(rename_all = "camelCase")]
171pub struct BugGetRecordOutput<'a> {
172 #[serde(skip_serializing_if = "Option::is_none")]
173 #[serde(borrow)]
174 pub cid: Option<Cid<'a>>,
175 #[serde(borrow)]
176 pub uri: AtUri<'a>,
177 #[serde(borrow)]
178 pub value: Bug<'a>,
179}
180
181impl<'a> Bug<'a> {
182 pub fn uri(
183 uri: impl Into<CowStr<'a>>,
184 ) -> Result<RecordUri<'a, BugRecord>, UriError> {
185 RecordUri::try_from_uri(AtUri::new_cow(uri.into())?)
186 }
187}
188
189#[derive(Debug, Serialize, Deserialize)]
192pub struct BugRecord;
193impl XrpcResp for BugRecord {
194 const NSID: &'static str = "network.slices.tools.bug";
195 const ENCODING: &'static str = "application/json";
196 type Output<'de> = BugGetRecordOutput<'de>;
197 type Err<'de> = RecordError<'de>;
198}
199
200impl From<BugGetRecordOutput<'_>> for Bug<'_> {
201 fn from(output: BugGetRecordOutput<'_>) -> Self {
202 use jacquard_common::IntoStatic;
203 output.value.into_static()
204 }
205}
206
207impl Collection for Bug<'_> {
208 const NSID: &'static str = "network.slices.tools.bug";
209 type Record = BugRecord;
210}
211
212impl Collection for BugRecord {
213 const NSID: &'static str = "network.slices.tools.bug";
214 type Record = BugRecord;
215}
216
217impl<'a> LexiconSchema for Bug<'a> {
218 fn nsid() -> &'static str {
219 "network.slices.tools.bug"
220 }
221 fn def_name() -> &'static str {
222 "main"
223 }
224 fn lexicon_doc() -> LexiconDoc<'static> {
225 lexicon_doc_network_slices_tools_bug()
226 }
227 fn validate(&self) -> Result<(), ConstraintError> {
228 if let Some(ref value) = self.app_used {
229 #[allow(unused_comparisons)]
230 if <str>::len(value.as_ref()) > 300usize {
231 return Err(ConstraintError::MaxLength {
232 path: ValidationPath::from_field("app_used"),
233 max: 300usize,
234 actual: <str>::len(value.as_ref()),
235 });
236 }
237 }
238 {
239 let value = &self.description;
240 #[allow(unused_comparisons)]
241 if <str>::len(value.as_ref()) > 10000usize {
242 return Err(ConstraintError::MaxLength {
243 path: ValidationPath::from_field("description"),
244 max: 10000usize,
245 actual: <str>::len(value.as_ref()),
246 });
247 }
248 }
249 {
250 let value = &self.description;
251 {
252 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
253 if count > 3000usize {
254 return Err(ConstraintError::MaxGraphemes {
255 path: ValidationPath::from_field("description"),
256 max: 3000usize,
257 actual: count,
258 });
259 }
260 }
261 }
262 {
263 let value = &self.steps_to_reproduce;
264 #[allow(unused_comparisons)]
265 if <str>::len(value.as_ref()) > 5000usize {
266 return Err(ConstraintError::MaxLength {
267 path: ValidationPath::from_field("steps_to_reproduce"),
268 max: 5000usize,
269 actual: <str>::len(value.as_ref()),
270 });
271 }
272 }
273 {
274 let value = &self.steps_to_reproduce;
275 {
276 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
277 if count > 1500usize {
278 return Err(ConstraintError::MaxGraphemes {
279 path: ValidationPath::from_field("steps_to_reproduce"),
280 max: 1500usize,
281 actual: count,
282 });
283 }
284 }
285 }
286 {
287 let value = &self.title;
288 #[allow(unused_comparisons)]
289 if <str>::len(value.as_ref()) > 300usize {
290 return Err(ConstraintError::MaxLength {
291 path: ValidationPath::from_field("title"),
292 max: 300usize,
293 actual: <str>::len(value.as_ref()),
294 });
295 }
296 }
297 {
298 let value = &self.title;
299 {
300 let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
301 if count > 100usize {
302 return Err(ConstraintError::MaxGraphemes {
303 path: ValidationPath::from_field("title"),
304 max: 100usize,
305 actual: count,
306 });
307 }
308 }
309 }
310 Ok(())
311 }
312}
313
314pub mod bug_state {
315
316 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
317 #[allow(unused)]
318 use ::core::marker::PhantomData;
319 mod sealed {
320 pub trait Sealed {}
321 }
322 pub trait State: sealed::Sealed {
324 type StepsToReproduce;
325 type Title;
326 type Namespace;
327 type Description;
328 type Severity;
329 type CreatedAt;
330 }
331 pub struct Empty(());
333 impl sealed::Sealed for Empty {}
334 impl State for Empty {
335 type StepsToReproduce = Unset;
336 type Title = Unset;
337 type Namespace = Unset;
338 type Description = Unset;
339 type Severity = Unset;
340 type CreatedAt = Unset;
341 }
342 pub struct SetStepsToReproduce<S: State = Empty>(PhantomData<fn() -> S>);
344 impl<S: State> sealed::Sealed for SetStepsToReproduce<S> {}
345 impl<S: State> State for SetStepsToReproduce<S> {
346 type StepsToReproduce = Set<members::steps_to_reproduce>;
347 type Title = S::Title;
348 type Namespace = S::Namespace;
349 type Description = S::Description;
350 type Severity = S::Severity;
351 type CreatedAt = S::CreatedAt;
352 }
353 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
355 impl<S: State> sealed::Sealed for SetTitle<S> {}
356 impl<S: State> State for SetTitle<S> {
357 type StepsToReproduce = S::StepsToReproduce;
358 type Title = Set<members::title>;
359 type Namespace = S::Namespace;
360 type Description = S::Description;
361 type Severity = S::Severity;
362 type CreatedAt = S::CreatedAt;
363 }
364 pub struct SetNamespace<S: State = Empty>(PhantomData<fn() -> S>);
366 impl<S: State> sealed::Sealed for SetNamespace<S> {}
367 impl<S: State> State for SetNamespace<S> {
368 type StepsToReproduce = S::StepsToReproduce;
369 type Title = S::Title;
370 type Namespace = Set<members::namespace>;
371 type Description = S::Description;
372 type Severity = S::Severity;
373 type CreatedAt = S::CreatedAt;
374 }
375 pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
377 impl<S: State> sealed::Sealed for SetDescription<S> {}
378 impl<S: State> State for SetDescription<S> {
379 type StepsToReproduce = S::StepsToReproduce;
380 type Title = S::Title;
381 type Namespace = S::Namespace;
382 type Description = Set<members::description>;
383 type Severity = S::Severity;
384 type CreatedAt = S::CreatedAt;
385 }
386 pub struct SetSeverity<S: State = Empty>(PhantomData<fn() -> S>);
388 impl<S: State> sealed::Sealed for SetSeverity<S> {}
389 impl<S: State> State for SetSeverity<S> {
390 type StepsToReproduce = S::StepsToReproduce;
391 type Title = S::Title;
392 type Namespace = S::Namespace;
393 type Description = S::Description;
394 type Severity = Set<members::severity>;
395 type CreatedAt = S::CreatedAt;
396 }
397 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
399 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
400 impl<S: State> State for SetCreatedAt<S> {
401 type StepsToReproduce = S::StepsToReproduce;
402 type Title = S::Title;
403 type Namespace = S::Namespace;
404 type Description = S::Description;
405 type Severity = S::Severity;
406 type CreatedAt = Set<members::created_at>;
407 }
408 #[allow(non_camel_case_types)]
410 pub mod members {
411 pub struct steps_to_reproduce(());
413 pub struct title(());
415 pub struct namespace(());
417 pub struct description(());
419 pub struct severity(());
421 pub struct created_at(());
423 }
424}
425
426pub struct BugBuilder<'a, S: bug_state::State> {
428 _state: PhantomData<fn() -> S>,
429 _fields: (
430 Option<CowStr<'a>>,
431 Option<Images<'a>>,
432 Option<Datetime>,
433 Option<CowStr<'a>>,
434 Option<Vec<Facet<'a>>>,
435 Option<CowStr<'a>>,
436 Option<BugSeverity<'a>>,
437 Option<CowStr<'a>>,
438 Option<Vec<Facet<'a>>>,
439 Option<CowStr<'a>>,
440 ),
441 _lifetime: PhantomData<&'a ()>,
442}
443
444impl<'a> Bug<'a> {
445 pub fn new() -> BugBuilder<'a, bug_state::Empty> {
447 BugBuilder::new()
448 }
449}
450
451impl<'a> BugBuilder<'a, bug_state::Empty> {
452 pub fn new() -> Self {
454 BugBuilder {
455 _state: PhantomData,
456 _fields: (None, None, None, None, None, None, None, None, None, None),
457 _lifetime: PhantomData,
458 }
459 }
460}
461
462impl<'a, S: bug_state::State> BugBuilder<'a, S> {
463 pub fn app_used(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
465 self._fields.0 = value.into();
466 self
467 }
468 pub fn maybe_app_used(mut self, value: Option<CowStr<'a>>) -> Self {
470 self._fields.0 = value;
471 self
472 }
473}
474
475impl<'a, S: bug_state::State> BugBuilder<'a, S> {
476 pub fn attachments(mut self, value: impl Into<Option<Images<'a>>>) -> Self {
478 self._fields.1 = value.into();
479 self
480 }
481 pub fn maybe_attachments(mut self, value: Option<Images<'a>>) -> Self {
483 self._fields.1 = value;
484 self
485 }
486}
487
488impl<'a, S> BugBuilder<'a, S>
489where
490 S: bug_state::State,
491 S::CreatedAt: bug_state::IsUnset,
492{
493 pub fn created_at(
495 mut self,
496 value: impl Into<Datetime>,
497 ) -> BugBuilder<'a, bug_state::SetCreatedAt<S>> {
498 self._fields.2 = Option::Some(value.into());
499 BugBuilder {
500 _state: PhantomData,
501 _fields: self._fields,
502 _lifetime: PhantomData,
503 }
504 }
505}
506
507impl<'a, S> BugBuilder<'a, S>
508where
509 S: bug_state::State,
510 S::Description: bug_state::IsUnset,
511{
512 pub fn description(
514 mut self,
515 value: impl Into<CowStr<'a>>,
516 ) -> BugBuilder<'a, bug_state::SetDescription<S>> {
517 self._fields.3 = Option::Some(value.into());
518 BugBuilder {
519 _state: PhantomData,
520 _fields: self._fields,
521 _lifetime: PhantomData,
522 }
523 }
524}
525
526impl<'a, S: bug_state::State> BugBuilder<'a, S> {
527 pub fn description_facets(
529 mut self,
530 value: impl Into<Option<Vec<Facet<'a>>>>,
531 ) -> Self {
532 self._fields.4 = value.into();
533 self
534 }
535 pub fn maybe_description_facets(mut self, value: Option<Vec<Facet<'a>>>) -> Self {
537 self._fields.4 = value;
538 self
539 }
540}
541
542impl<'a, S> BugBuilder<'a, S>
543where
544 S: bug_state::State,
545 S::Namespace: bug_state::IsUnset,
546{
547 pub fn namespace(
549 mut self,
550 value: impl Into<CowStr<'a>>,
551 ) -> BugBuilder<'a, bug_state::SetNamespace<S>> {
552 self._fields.5 = Option::Some(value.into());
553 BugBuilder {
554 _state: PhantomData,
555 _fields: self._fields,
556 _lifetime: PhantomData,
557 }
558 }
559}
560
561impl<'a, S> BugBuilder<'a, S>
562where
563 S: bug_state::State,
564 S::Severity: bug_state::IsUnset,
565{
566 pub fn severity(
568 mut self,
569 value: impl Into<BugSeverity<'a>>,
570 ) -> BugBuilder<'a, bug_state::SetSeverity<S>> {
571 self._fields.6 = Option::Some(value.into());
572 BugBuilder {
573 _state: PhantomData,
574 _fields: self._fields,
575 _lifetime: PhantomData,
576 }
577 }
578}
579
580impl<'a, S> BugBuilder<'a, S>
581where
582 S: bug_state::State,
583 S::StepsToReproduce: bug_state::IsUnset,
584{
585 pub fn steps_to_reproduce(
587 mut self,
588 value: impl Into<CowStr<'a>>,
589 ) -> BugBuilder<'a, bug_state::SetStepsToReproduce<S>> {
590 self._fields.7 = Option::Some(value.into());
591 BugBuilder {
592 _state: PhantomData,
593 _fields: self._fields,
594 _lifetime: PhantomData,
595 }
596 }
597}
598
599impl<'a, S: bug_state::State> BugBuilder<'a, S> {
600 pub fn steps_to_reproduce_facets(
602 mut self,
603 value: impl Into<Option<Vec<Facet<'a>>>>,
604 ) -> Self {
605 self._fields.8 = value.into();
606 self
607 }
608 pub fn maybe_steps_to_reproduce_facets(
610 mut self,
611 value: Option<Vec<Facet<'a>>>,
612 ) -> Self {
613 self._fields.8 = value;
614 self
615 }
616}
617
618impl<'a, S> BugBuilder<'a, S>
619where
620 S: bug_state::State,
621 S::Title: bug_state::IsUnset,
622{
623 pub fn title(
625 mut self,
626 value: impl Into<CowStr<'a>>,
627 ) -> BugBuilder<'a, bug_state::SetTitle<S>> {
628 self._fields.9 = Option::Some(value.into());
629 BugBuilder {
630 _state: PhantomData,
631 _fields: self._fields,
632 _lifetime: PhantomData,
633 }
634 }
635}
636
637impl<'a, S> BugBuilder<'a, S>
638where
639 S: bug_state::State,
640 S::StepsToReproduce: bug_state::IsSet,
641 S::Title: bug_state::IsSet,
642 S::Namespace: bug_state::IsSet,
643 S::Description: bug_state::IsSet,
644 S::Severity: bug_state::IsSet,
645 S::CreatedAt: bug_state::IsSet,
646{
647 pub fn build(self) -> Bug<'a> {
649 Bug {
650 app_used: self._fields.0,
651 attachments: self._fields.1,
652 created_at: self._fields.2.unwrap(),
653 description: self._fields.3.unwrap(),
654 description_facets: self._fields.4,
655 namespace: self._fields.5.unwrap(),
656 severity: self._fields.6.unwrap(),
657 steps_to_reproduce: self._fields.7.unwrap(),
658 steps_to_reproduce_facets: self._fields.8,
659 title: self._fields.9.unwrap(),
660 extra_data: Default::default(),
661 }
662 }
663 pub fn build_with_data(
665 self,
666 extra_data: BTreeMap<
667 jacquard_common::deps::smol_str::SmolStr,
668 jacquard_common::types::value::Data<'a>,
669 >,
670 ) -> Bug<'a> {
671 Bug {
672 app_used: self._fields.0,
673 attachments: self._fields.1,
674 created_at: self._fields.2.unwrap(),
675 description: self._fields.3.unwrap(),
676 description_facets: self._fields.4,
677 namespace: self._fields.5.unwrap(),
678 severity: self._fields.6.unwrap(),
679 steps_to_reproduce: self._fields.7.unwrap(),
680 steps_to_reproduce_facets: self._fields.8,
681 title: self._fields.9.unwrap(),
682 extra_data: Some(extra_data),
683 }
684 }
685}
686
687fn lexicon_doc_network_slices_tools_bug() -> LexiconDoc<'static> {
688 #[allow(unused_imports)]
689 use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
690 use jacquard_lexicon::lexicon::*;
691 use alloc::collections::BTreeMap;
692 LexiconDoc {
693 lexicon: Lexicon::Lexicon1,
694 id: CowStr::new_static("network.slices.tools.bug"),
695 defs: {
696 let mut map = BTreeMap::new();
697 map.insert(
698 SmolStr::new_static("main"),
699 LexUserType::Record(LexRecord {
700 key: Some(CowStr::new_static("tid")),
701 record: LexRecordRecord::Object(LexObject {
702 required: Some(
703 vec![
704 SmolStr::new_static("title"),
705 SmolStr::new_static("namespace"),
706 SmolStr::new_static("description"),
707 SmolStr::new_static("stepsToReproduce"),
708 SmolStr::new_static("severity"),
709 SmolStr::new_static("createdAt")
710 ],
711 ),
712 properties: {
713 #[allow(unused_mut)]
714 let mut map = BTreeMap::new();
715 map.insert(
716 SmolStr::new_static("appUsed"),
717 LexObjectProperty::String(LexString {
718 max_length: Some(300usize),
719 ..Default::default()
720 }),
721 );
722 map.insert(
723 SmolStr::new_static("attachments"),
724 LexObjectProperty::Union(LexRefUnion {
725 refs: vec![
726 CowStr::new_static("network.slices.tools.defs#images")
727 ],
728 ..Default::default()
729 }),
730 );
731 map.insert(
732 SmolStr::new_static("createdAt"),
733 LexObjectProperty::String(LexString {
734 format: Some(LexStringFormat::Datetime),
735 ..Default::default()
736 }),
737 );
738 map.insert(
739 SmolStr::new_static("description"),
740 LexObjectProperty::String(LexString {
741 max_length: Some(10000usize),
742 max_graphemes: Some(3000usize),
743 ..Default::default()
744 }),
745 );
746 map.insert(
747 SmolStr::new_static("descriptionFacets"),
748 LexObjectProperty::Array(LexArray {
749 description: Some(
750 CowStr::new_static(
751 "Annotations of description (mentions and links)",
752 ),
753 ),
754 items: LexArrayItem::Ref(LexRef {
755 r#ref: CowStr::new_static(
756 "network.slices.tools.richtext.facet",
757 ),
758 ..Default::default()
759 }),
760 ..Default::default()
761 }),
762 );
763 map.insert(
764 SmolStr::new_static("namespace"),
765 LexObjectProperty::String(LexString {
766 description: Some(
767 CowStr::new_static(
768 "Target namespace like 'social.grain' or 'app.bsky'",
769 ),
770 ),
771 ..Default::default()
772 }),
773 );
774 map.insert(
775 SmolStr::new_static("severity"),
776 LexObjectProperty::String(LexString {
777 ..Default::default()
778 }),
779 );
780 map.insert(
781 SmolStr::new_static("stepsToReproduce"),
782 LexObjectProperty::String(LexString {
783 max_length: Some(5000usize),
784 max_graphemes: Some(1500usize),
785 ..Default::default()
786 }),
787 );
788 map.insert(
789 SmolStr::new_static("stepsToReproduceFacets"),
790 LexObjectProperty::Array(LexArray {
791 description: Some(
792 CowStr::new_static(
793 "Annotations of steps to reproduce (mentions and links)",
794 ),
795 ),
796 items: LexArrayItem::Ref(LexRef {
797 r#ref: CowStr::new_static(
798 "network.slices.tools.richtext.facet",
799 ),
800 ..Default::default()
801 }),
802 ..Default::default()
803 }),
804 );
805 map.insert(
806 SmolStr::new_static("title"),
807 LexObjectProperty::String(LexString {
808 max_length: Some(300usize),
809 max_graphemes: Some(100usize),
810 ..Default::default()
811 }),
812 );
813 map
814 },
815 ..Default::default()
816 }),
817 ..Default::default()
818 }),
819 );
820 map
821 },
822 ..Default::default()
823 }
824}