Skip to content

Commit

Permalink
Add some basic meetup validation
Browse files Browse the repository at this point in the history
  • Loading branch information
plaindocs committed Oct 16, 2024
1 parent 7eeab5f commit ef77065
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/_data/schema-meetups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
region: str(required=True)
country: str(required=True)
state: str(required=False)
city: str(required=False)
website: str(required=False)
twitter: str(required=False)
meetup: str(required=False) # I can't figure out how to validate must contain either meetup or meetup_alt
meetup_alt: str(required=False)
organizers: list(include('organizer-detail'), min=1, max=9)

---

organizer-detail:
name: str(required=True)
link: str(required=False)
6 changes: 6 additions & 0 deletions docs/_scripts/validate-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ do
yamale -s docs/_data/schema-sessions.yaml $y -p ruamel
done

for y in ../_data/meetups/*.yaml
do
[[ $y == *"schema"* ]] && continue
yamale -s docs/_data/schema-meetups.yaml $y -p ruamel
done

cd -

0 comments on commit ef77065

Please sign in to comment.