pub mod artifacts;
pub mod coordinates;
pub mod creatures;
pub mod dance_forms;
pub mod df_st_info;
pub mod entities;
pub mod entity_populations;
pub mod historical_eras;
pub mod historical_event_collections;
pub mod historical_events;
pub mod historical_figures;
pub mod identities;
pub mod landmasses;
pub mod links;
pub mod map_images;
pub mod mountain_peaks;
pub mod musical_forms;
pub mod poetic_forms;
pub mod regions;
pub mod rivers;
pub mod site_map_images;
pub mod sites;
pub mod underground_regions;
pub mod world_constructions;
pub mod world_info;
pub mod written_content;
use okapi::openapi3::OpenApi;
use rocket::Route;
use df_rocket_okapi_codegen::routes_and_spec_with_openapi;
static APPLICATION_NAME: &str = "DF Storyteller";
static APPLICATION_DESCRIPTION: &str = "DF Storyteller is an application for parsing and \
storing Dwarf Fortress Legends files. It provides an interface for other apps to visualize the data.";
static APPLICATION_LICENSE: &str = "GPL-3.0-or-later";
static APPLICATION_LICENSE_URL: &str =
"https://gitlab.com/df_storyteller/df-storyteller/-/blob/master/LICENSE";
static APPLICATION_DOCS_NAME: &str = "Rust Docs";
static APPLICATION_DOCS_URL: &str = "https://docs.dfstoryteller.com/rust-docs/";
fn get_spec_and_routes() -> (OpenApi, Vec<Route>) {
let (spec, routes) = routes_and_spec_with_openapi![
df_st_info::get_df_st_info,
world_info::get_world_info,
world_info::list_worlds_info,
world_info::get_world_info_count,
artifacts::get_artifact,
artifacts::list_artifacts,
artifacts::get_artifact_count,
coordinates::get_coordinate,
coordinates::list_coordinates,
coordinates::get_coordinate_count,
creatures::get_creature,
creatures::list_creatures,
creatures::get_creature_count,
dance_forms::get_dance_form,
dance_forms::list_dance_forms,
dance_forms::get_dance_form_count,
entities::get_entity,
entities::list_entities,
entities::get_entity_count,
entity_populations::get_entity_population,
entity_populations::list_entity_populations,
entity_populations::get_entity_population_count,
historical_eras::get_historical_era,
historical_eras::list_historical_eras,
historical_eras::get_historical_era_count,
historical_events::get_historical_event,
historical_events::list_historical_events,
historical_events::get_historical_event_count,
historical_event_collections::get_historical_event_collection,
historical_event_collections::list_historical_event_collections,
historical_event_collections::get_historical_event_collection_count,
historical_figures::get_historical_figure,
historical_figures::list_historical_figures,
historical_figures::get_historical_figure_count,
identities::get_identity,
identities::list_identities,
identities::get_identity_count,
landmasses::get_landmass,
landmasses::list_landmasses,
landmasses::get_landmass_count,
mountain_peaks::get_mountain_peak,
mountain_peaks::list_mountain_peaks,
mountain_peaks::get_mountain_peak_count,
musical_forms::get_musical_form,
musical_forms::list_musical_forms,
musical_forms::get_musical_form_count,
poetic_forms::get_poetic_form,
poetic_forms::list_poetic_forms,
poetic_forms::get_poetic_form_count,
regions::get_region,
regions::list_regions,
regions::get_region_count,
rivers::get_river,
rivers::list_rivers,
rivers::get_river_count,
sites::get_site,
sites::list_sites,
sites::get_site_count,
sites::get_site_structure,
sites::list_site_structures,
sites::get_site_structure_count,
sites::get_site_property,
sites::list_site_properties,
sites::get_site_property_count,
sites::list_structures,
sites::get_structure_count,
sites::list_all_site_properties,
sites::get_all_site_property_count,
underground_regions::get_underground_region,
underground_regions::list_underground_regions,
underground_regions::get_underground_region_count,
world_constructions::get_world_construction,
world_constructions::list_world_constructions,
world_constructions::get_world_construction_count,
written_content::get_written_content,
written_content::list_written_contents,
written_content::get_written_content_count,
map_images::get_map_image,
map_images::list_map_images,
map_images::get_map_image_count,
map_images::get_map_image_png,
site_map_images::get_site_map_image,
site_map_images::list_site_map_images,
site_map_images::get_site_map_image_count,
site_map_images::get_site_map_image_png,
links::list_link_he_hf,
links::list_he_from_hf,
];
(spec, routes)
}
pub fn get_routes() -> Vec<Route> {
get_spec_and_routes().1
}
pub fn get_openapi_spec() -> OpenApi {
get_spec_and_routes().0
}