routes.rb revision da700948e5ec3281e1b28166430dcabce2cb6bff
98N/AWill return a representation of the ontology at a 98N/Aontology version referenced by the {reference}. 970N/A specified_get '/ref/:reference/:repository_id/*locid' => 'ontologies#show', 970N/A as: :ontology_iri_versioned, 1549N/A RefLocIdRouterConstraint.new(Ontology, ontology: :id), 98N/A doc title: 'Ontology IRI (loc/id) with version reference', 1549N/AWill return a representation of the ontology at a 1549N/Aontology version referenced by the {reference}. 98N/A specified_get '/ref/mmt/:repository_id/*path' => 'ontologies#show', 98N/A as: :ontology_iri_mmt, 156N/A MMTRouterConstraint.new(Ontology, ontology: :id), 98N/A reroute_on_mime 'text/plain', to: 'api/v1/ontologies#show' 98N/A reroute_on_mime 'application/json', to: 'api/v1/ontologies#show' 1296N/A doc title: 'MMT reference to an ontology', 1124N/AWill return a representation of the ontology. The ontology 1124N/Ais determined according to the *path and to the MMT-query-string. 1333N/A specified_get '/ref/mmt/:repository_id/*path' => 'mappings#show', 1089N/A MMTRouterConstraint.new(Mapping, ontology: :ontology_id, element: :id), 1630N/A reroute_on_mime 'application/json', to: 'api/v1/mappings#show' 1630N/A doc title: 'MMT reference to a mapping', 493N/AWill return a representation of the mapping. The mapping 1451N/Ais determined according to the *path and to the MMT-query-string. 1451N/A specified_get '/ref/mmt/:repository_id/*path' => 'symbols#index', 1418N/A MMTRouterConstraint.new(OntologyMember::Symbol, ontology: :ontology_id), 98N/A reroute_on_mime 'application/json', to: 'api/v1/symbols#show' 1124N/A doc title: 'MMT reference to a symbol', 1124N/AWill return a representation of the symbol. The symbol 1124N/Ais determined according to the *path and to the MMT-query-string. 98N/ACurrently the representation ist a list of all symbols in the ontology. 1089N/A specified_get '/ref/mmt/:repository_id/*path' => 'axioms#index', 1089N/A MMTRouterConstraint.new(Axiom, ontology: :ontology_id), 1451N/A reroute_on_mime 'application/json', to: 'api/v1/axioms#show' 1610N/A doc title: 'MMT reference to a axiom', 1451N/AWill return a representation of the axiom. The axiom 1466N/Ais determined according to the *path and to the MMT-query-string. 1466N/ACurrently the representation is a list of all axioms in the ontology. specified_get '/ref/mmt/:repository_id/*path' => 'theorems#index', MMTRouterConstraint.new(Theorem, ontology: :ontology_id, element: :id), doc title: 'MMT reference to a theorem', Will return a representation of the theorem. The theorem is determined according to the *path and to the MMT-query-string. Currently the representation is a list of all theorems in the ontology. specified_get '/ref/mmt/:repository_id/*path' => 'api/v1/proof_attempt_configurations#show', as: :proof_attempt_configuration_iri_mmt, MMTRouterConstraint.new(ProofAttemptConfiguration, ontology: :ontology_id), accept 'application/json' doc title: 'MMT reference to a proof attempt configuration', Will return a representation of the proof attempt configuration. The proof attempt configuration is determined according to the *path and to the # Subsites for ontologies projects categories tasks ontology_api_subsites = %i( mappings symbols children license_models formality_levels proof_attempt_configurations ontology_subsites.each do |category| specified_get "/:repository_id/*locid///#{category}" => "#{category}#index", as: :"ontology_iri_#{category}", LocIdRouterConstraint.new(Ontology, ontology: :ontology_id), doc title: "Ontology subsite about #{category.to_s.gsub(/_/, ' ')}", Will provide a subsite of a specific ontology. ontology_api_subsites.each do |category| specified_get "/:repository_id/*locid///#{category}" => "#{category}#index", as: :"ontology_iri_#{category}", LocIdRouterConstraint.new(Ontology, ontology: :ontology_id), reroute_on_mime 'application/json', to: "api/v1/#{category}#index" doc title: "Ontology subsite about #{category.to_s.gsub(/_/, ' ')}", Will provide a subsite of a specific ontology. specified_get "/:repository_id/*locid///sentences" => "api/v1/sentences#index", as: :"ontology_iri_sentences", LocIdRouterConstraint.new(Ontology, ontology: :ontology_id), accept 'application/json' doc title: "Ontology subsite about sentences", Will provide a subsite of a specific ontology. # Loc/Id-Show(-equivalent) routes specified_get '/:repository_id/*locid' => 'ontologies#show', LocIdRouterConstraint.new(Ontology, ontology: :id), reroute_on_mime 'text/plain', to: 'api/v1/ontologies#show' reroute_on_mime 'application/json', to: 'api/v1/ontologies#show' doc title: 'loc/id reference to an ontology', Will return a representation of the ontology. The ontology is determined according to the *locid. specified_get '/:repository_id/*locid' => 'mappings#show', LocIdRouterConstraint.new(Mapping, ontology: :ontology_id, element: :id), reroute_on_mime 'application/json', to: 'api/v1/mappings#show' doc title: 'loc/id reference to a mapping', Will return a representation of the mapping. The mapping is determined according to the *locid. specified_get '/:repository_id/*locid' => 'symbols#index', LocIdRouterConstraint.new(OntologyMember::Symbol, ontology: :ontology_id, element: :id), reroute_on_mime 'application/json', to: 'api/v1/symbols#show' doc title: 'loc/id reference to a symbol', Will return a representation of the symbol. The symbol is determined according to the *locid. Currently this will return the list of all symbols of the ontology. theorems_subsites = %i(proof_attempts) theorems_subsites.each do |subsite| specified_get "/:repository_id/*locid///#{subsite}" => "#{subsite}#index", as: :"theorem_iri_#{subsite}", LocIdRouterConstraint.new(Theorem, ontology: :ontology_id, element: :theorem_id), reroute_on_mime 'application/json', to: "api/v1/#{subsite}#index" doc title: 'loc/id reference to a theorem subsite', Will return a representation of the theorem subsite. The theorem is determined according to the *locid. specified_get "/:repository_id/*locid" => "prover_outputs#show", as: :"prover_output_iri", LocIdRouterConstraint.new(ProverOutput, ontology: :ontology_id, theorem: :theorem_id, proof_attempt: :proof_attempt_id, element: :id), accept 'application/json' reroute_on_mime 'application/json', to: "api/v1/prover_outputs#show" doc title: 'loc/id reference to a prover output', Will return a prover output. The prover output is determined according to the *locid. proof_attempt_api_subsites = %i( used_axioms generated_axioms used_theorems prover_output proof_attempt_api_subsites.each do |subsite| specified_get "/:repository_id/*locid///#{subsite}" => "api/v1/proof_attempts##{subsite}", as: :"proof_attempt_iri_#{subsite}", LocIdRouterConstraint.new(ProofAttempt, ontology: :ontology_id, theorem: :theorem_id, element: :id), accept 'application/json' doc title: 'loc/id reference to a proof attempt subsite', Will return a subsite of the proof attempt. The proof attempt is determined sentence_types = %i(axiom theorem) sentence_api_subsites = %i(symbols) sentence_types.each do |type| sentence_api_subsites.each do |subsite| specified_get "/:repository_id/*locid///#{subsite}" => "api/v1/#{subsite}#index", as: :"#{type}_iri_#{subsite}", LocIdRouterConstraint.new(type.to_s.camelize.constantize, ontology: :ontology_id, element: :"sentence_id"), accept 'application/json' doc title: "loc/id reference to a #{type} subsite", Will return a representation of the #{type} subsite. The #{type} is determined according to the *locid. specified_get '/:repository_id/*locid' => 'axioms#index', LocIdRouterConstraint.new(Axiom, ontology: :ontology_id, element: :id), reroute_on_mime 'application/json', to: 'api/v1/axioms#show' doc title: 'loc/id reference to an axiom', Will return a representation of the axiom. The axiom is determined according to the *locid. Currently this will return the list of all axioms of the ontology. specified_get '/:repository_id/*locid' => 'theorems#index', LocIdRouterConstraint.new(Theorem, ontology: :ontology_id, element: :id), reroute_on_mime 'application/json', to: 'api/v1/theorems#show' doc title: 'loc/id reference to a theorem', Will return a representation of the theorem. The theorem is determined according to the *locid. proof_attempt_configuration_api_subsites = %i(selected_axioms selected_theorems) proof_attempt_configuration_api_subsites.each do |subsite| specified_get "/:repository_id/*locid///#{subsite}" => "api/v1/proof_attempt_configurations##{subsite}", as: :"proof_attempt_configuration_iri_#{subsite}", LocIdRouterConstraint.new(ProofAttemptConfiguration, ontology: :ontology_id, element: :id), accept 'application/json' doc title: 'loc/id reference to a proof attempt configuration subsite', Will return a subsite of the proof attempt configuration. The proof attempt configuration is determined according to the *locid. specified_get '/:repository_id/*locid' => 'api/v1/proof_attempt_configurations#show', as: :proof_attempt_configuration_iri, LocIdRouterConstraint.new(ProofAttemptConfiguration, ontology: :ontology_id, element: :id), accept 'application/json' doc title: 'loc/id reference to a proof attempt configuration', Will return a representation of the proof attempt configuration. The proof attempt configuration is determined according to the *locid. specified_get '/:repository_id/*locid' => 'sentences#index', LocIdRouterConstraint.new(Sentence, ontology: :ontology_id, element: :id), reroute_on_mime 'application/json', to: 'api/v1/sentences#show' doc title: 'loc/id reference to a sentence', Will return a representation of the sentence. The sentence is determined according to the *locid. Currently this will return the list of all sentences of the ontology. specified_get '/:repository_id/*locid' => 'proof_attempts#show', LocIdRouterConstraint.new(ProofAttempt, ontology: :ontology_id, theorem: :theorem_id, element: :id), reroute_on_mime 'application/json', to: 'api/v1/proof_attempts#show' doc title: 'loc/id reference to a proof attempt', Will return a representation of the proof attempt. The proof attempt is determined according to the *locid. specified_get '/ontology_types/:id' => 'ontology_types#show', reroute_on_mime 'application/json', to: 'api/v1/ontology_types#show' doc title: 'IRI of an ontology type', Will return a representation of the ontology type. specified_get '/logics/:id' => 'logics#show', reroute_on_mime 'text/xml', to: 'api/v1/logics#show' reroute_on_mime 'application/xml', to: 'api/v1/logics#show' reroute_on_mime 'application/rdf+xml', to: 'api/v1/logics#show' reroute_on_mime 'application/json', to: 'api/v1/logics#show' doc title: 'IRI of a logic', Will return a representation of the logic. specified_get '/license_models/:id' => 'license_models#show', reroute_on_mime 'application/json', to: 'api/v1/license_models#show' doc title: 'IRI of a license model', Will return a representation of the license model. specified_get '/formality_levels/:id' => 'formality_levels#show', reroute_on_mime 'application/json', to: 'api/v1/formality_levels#show' doc title: 'IRI of a formality level', Will return a representation of the formality level. specified_get '/proof-statuses' => 'api/v1/proof_statuses#index', accept 'application/json' doc title: 'index of proof statuses', Will return a representation of the proof statuses index. specified_get '*locid' => 'api/v1/proof_statuses#show', LocIdRouterConstraint.new(ProofStatus, element: :id), accept 'application/json' doc title: 'loc/id reference to a proof status', Will return a representation of the proof status. The proof status is determined according to the *locid. get '/after_signup', to: 'home#show' , as: 'after_sign_up' devise_for :users, controllers: { confirmations: 'users/confirmations', registrations: 'users/registrations' resources :users, only: :show resource :api_keys, only: %w(create) resources :keys, except: [:show, :edit, :update] resources :logics, only: [:index, :show] do resources :supports, :only => [:create, :update, :destroy, :index] resources :graphs, :only => [:index] resources :supports, :only => [:create, :update, :destroy, :index] resources :language_mappings resources :logic_mappings, except: %i(index show) specified_get '/logic_mappings' => 'logic_mappings#index', reroute_on_mime 'application/json', to: 'api/v1/logic_mappings#index' doc title: 'index of logic mappings', Will return a representation of the logic mappings index. specified_get '/logic_mappings/:id' => 'logic_mappings#show', reroute_on_mime 'application/json', to: 'api/v1/logic_mappings#show' doc title: 'id reference to a logic mapping', Will return a representation of the logic mapping. The logic mapping is determined according to the id. resources :mappings, only: :index resources :categories, :only => [:index, :show] resources :license_models resources :formality_levels resources :language_adjoints resources :logic_adjoints resources :serializations resources :teams, :only => :index resources :jobs, :only => :index resources :status, only: :index authenticate :user, lambda { |u| u.admin? } do mount Sidekiq::Web => 'admin/sidekiq' resources :ontologies, only: [:index] do get 'search' => 'ontology_search#search' get 'update_version', :on => :member resources :permissions, :only => [:index], :controller => 'teams/permissions' resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users' get 'autocomplete' => 'autocomplete#index' get 'symbols_search' => 'symbols_search#index' resources :repositories do controller: :repositories, resources :s_s_h_access, :only => :index, path: 'ssh_access' resources :permissions, :only => [:index, :create, :update, :destroy] resources :url_maps, except: :show resources :errors, :only => :index resources :repository_settings, :only => :index resources :ontologies, only: [:index, :show, :edit, :update, :destroy] do post 'retry_failed' => 'ontologies#retry_failed' get 'search' => 'ontology_search#search' post 'retry_failed' => 'ontologies#retry_failed' resources :children, :only => :index resources :symbols, only: %i(index show) resources :axioms, only: :index resources :theorems, only: :index do resources :proof_attempts, only: %i(index show) do resource :prover_output, only: :show get '/proofs/new', controller: :proofs, action: :new post '/proofs', controller: :proofs, action: :create get '/proofs/new', controller: :proofs, action: :new post '/proofs', controller: :proofs, action: :create get 'update_version', :on => :member resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions' do resource :oops_request, :only => [:show, :create] resources :license_models resources :metadata, :only => [:index, :create, :destroy] resources :comments, :only => [:index, :create, :destroy] resources :graphs, :only => [:index] resources :formality_levels resources :files, only: [:new, :create] resources :repository_directories, only: [:create] get ':ref/files(/*path)', constraints: FilesRouterConstraint.new get ':ref/history(/:path)', constraints: { path: /.*/ } get ':ref/:action(/:path)', constraints: { path: /.*/ } specified_get '/:id' => 'api/v1/repositories#show', accept 'application/json', constraint: true doc title: 'loc/id reference to a repository', Will return a representation of the repository. The repository is determined according to its path, which is considered as specified_post '/:repository_id///combinations' => 'api/v1/combinations#create', as: :repository_combinations_iri do accept 'application/json', constraint: true doc title: 'loc/id reference to a repository', Will return a representation of the repository. The repository is determined according to its path, which is considered as post ':repository_id/:path', constraints: { path: /.*/ } get ':repository_id(/*path)', constraints: FilesRouterConstraint.new constraints: IRIRouterConstraint.new