Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync5 #113

Merged
merged 51 commits into from
Feb 17, 2025
Merged

Sync5 #113

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8388527
Always add CORS headers
haideriqbal Dec 5, 2024
52ff6dc
Add EMI ontology
haideriqbal Dec 13, 2024
0c8a8f8
Merge pull request #818 from EBISPOT/add-emi-onotology
haideriqbal Dec 13, 2024
17017ee
Add Swagger Documentation for V2 API
haideriqbal Jan 9, 2025
febfef3
Add DefinedFields page on frontend
haideriqbal Jan 14, 2025
004f8b5
Update URL format
haideriqbal Jan 14, 2025
fc0d0bc
Remove Extra Slash in URL
haideriqbal Jan 14, 2025
254bfb9
Update URL in SwaggerConfig
haideriqbal Jan 14, 2025
dd67b89
Merge pull request #820 from EBISPOT/add-v2-api-documentation
haideriqbal Jan 14, 2025
c940bb5
Update API URL in Swagger-UI
haideriqbal Jan 15, 2025
7e6bf8e
Merge pull request #825 from EBISPOT/fix-swagger-ui-api-docs-endpoint
haideriqbal Jan 15, 2025
ff70aa1
Update ontolog_purl and mailing_list fields
haideriqbal Jan 17, 2025
5b05e13
Update testcases
haideriqbal Jan 20, 2025
ce657d0
Update API testcases
haideriqbal Jan 20, 2025
ef2ef39
Sort DefinedFields
haideriqbal Jan 23, 2025
751acf7
Merge pull request #827 from EBISPOT/update-api-fields
haideriqbal Jan 27, 2025
8012d73
Merge pull request #828 from EBISPOT/update-api-fields-tests
haideriqbal Jan 27, 2025
6829053
Merge pull request #829 from EBISPOT/update-api-fields-tests-api
haideriqbal Jan 27, 2025
3e078b2
Merge pull request #813 from EBISPOT/always-add-cors-headers
haideriqbal Jan 27, 2025
3816128
Add EVORA and ICTV ontologies
jamesamcl Jan 27, 2025
8a733d9
Merge branch 'dev' into stable
haideriqbal Jan 27, 2025
75ee8c3
Fix Unknown Class Expression
haideriqbal Jan 27, 2025
1826026
Handle when synonym is object
haideriqbal Jan 28, 2025
ea4496b
Revert URL change for swagger
haideriqbal Jan 29, 2025
20a534a
Merge pull request #835 from EBISPOT/revert-swagger-api-url-change
haideriqbal Jan 29, 2025
d4235e7
Merge pull request #833 from EBISPOT/fix-entity-page-crash
haideriqbal Feb 3, 2025
9ac9bd0
Merge pull request #831 from EBISPOT/fix-unknown-class-expression-error
haideriqbal Feb 3, 2025
d00b849
Fix V2 Ontology Controller documentation
haideriqbal Feb 6, 2025
7d9a345
Fix V2 Property Controller documentation
haideriqbal Feb 6, 2025
30a3d8b
Fix V2 Entity Controller documentation
haideriqbal Feb 6, 2025
fecc0f3
Fix V2 Class Controller documentation
haideriqbal Feb 6, 2025
c35be41
Remove EVORA from OLS
haideriqbal Feb 7, 2025
167cdd1
Merge pull request #841 from EBISPOT/remove-evora
haideriqbal Feb 7, 2025
ff4bb99
Merge pull request #842 from EBISPOT/stable
haideriqbal Feb 7, 2025
64db0ab
Update V1 Ontology Individual Controller documentation
haideriqbal Feb 10, 2025
fd85c2b
Update V1 Ontology Term Controller documentation
haideriqbal Feb 10, 2025
b934df4
Update V1 Term Controller documentation
haideriqbal Feb 10, 2025
39ff475
Update V1 Property Controller documentation
haideriqbal Feb 10, 2025
80b4309
Update V1 Individual Controller documentation
haideriqbal Feb 10, 2025
5fc27e3
Update V1 Individual Controller documentation
haideriqbal Feb 10, 2025
546e3a7
Update V1 Property Controller documentation
haideriqbal Feb 10, 2025
c5ad13a
Update V1 Ontology Property Controller documentation
haideriqbal Feb 10, 2025
185a083
Update V2 Individual Controller documentation
haideriqbal Feb 10, 2025
78d755c
Merge pull request #845 from EBISPOT/fix-api-documentation-errors
haideriqbal Feb 10, 2025
8e235cf
Add NULL exception check
haideriqbal Feb 11, 2025
794773d
Add EVORA back to OLS
haideriqbal Feb 11, 2025
8526fbf
Add MBA and DMBA to OLS
haideriqbal Feb 12, 2025
9edfa0b
Merge pull request #848 from EBISPOT/fix-evora
haideriqbal Feb 13, 2025
720c912
Merge pull request #850 from EBISPOT/add-mba-dmba-ontologies
haideriqbal Feb 13, 2025
06e12b7
Update MBA and DMBA
haideriqbal Feb 13, 2025
3047acd
Merge pull request #851 from EBISPOT/update-mba-dmba-ontology
haideriqbal Feb 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;

// Alwasy add CORS headers. add CORS "pre-flight" request headers
httpResponse.addHeader("Access-Control-Allow-Origin", "*");
httpResponse.addHeader("Access-Control-Allow-Headers", "*");
httpResponse.addHeader("Access-Control-Allow-Methods", "GET");
httpResponse.addHeader("Access-Control-Max-Age", "3600");

// is this a CORS request?
if (httpRequest.getHeader("Origin") != null) {
String origin = httpRequest.getHeader("Origin");
String requestURI = httpRequest.getRequestURI();
getLog().trace("Possible cross-origin request received from '" + origin + "' to IRI: " +
"'" + requestURI + "'. Enabling CORS.");

// add CORS "pre-flight" request headers
httpResponse.addHeader("Access-Control-Allow-Origin", "*");
httpResponse.addHeader("Access-Control-Allow-Headers", "*");
httpResponse.addHeader("Access-Control-Allow-Methods", "GET");
}

chain.doFilter(request, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public OpenAPI customOpenApi(ServletContext context) {
.addServersItem(new Server().url(serverUrl))
.info(new Info()
.title("OLS Service")
.description("REST API for OLS")
.description("REST API for OLS. Please see <a href='"+OLS4_SERVER_URL+"/defined-response-fields' target='_blank'> this page</a> for defined response field in OLS.")
.version("3.0")
.termsOfService("https://www.ebi.ac.uk/about/terms-of-use/")
.license(new License()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ HttpEntity<PagedModel<V1Individual>> getAllIndividuals(
@PathVariable("iri")
@Parameter(name = "iri",
description = "The IRI of the individual, this value must be double URL encoded",
example = "http%3A%252F%2Fpurl.obolibrary.org%2Fobo%2FIAO_0000124") String termId,
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FGAZ_00043159") String termId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand All @@ -69,16 +69,16 @@ HttpEntity<PagedModel<V1Individual>> getAllIndividuals(
HttpEntity<PagedModel<V1Individual>> getAllIndividuals(
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the individual, this value must be double URL encoded",
example = "http%3A%252F%2Fpurl.obolibrary.org%2Fobo%2FIAO_0000124") String iri,
description = "The IRI of the individual.",
example = "http://purl.obolibrary.org/obo/GAZ_00043159") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the individual.",
example = "IAO_0000124") String shortForm,
example = "GAZ_00043159") String shortForm,
@RequestParam(value = "obo_id", required = false)
@Parameter(name = "obo_id",
description = "This refers to the OBO ID of the individual.",
example = "IAO:0000124") String oboId,
example = "GAZ:00043159") String oboId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand All @@ -103,7 +103,7 @@ HttpEntity<PagedModel<V1Individual>> getAllIndividualsByIdAndIsDefiningOntology(
@PathVariable("iri")
@Parameter(name = "iri",
description = "The IRI of the individual, this value must be double URL encoded",
example = "http%3A%252F%2Fpurl.obolibrary.org%2Fobo%2FIAO_0000124") String termId,
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FOHD_0000363") String termId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand All @@ -121,15 +121,15 @@ HttpEntity<PagedModel<V1Individual>> getAllIndividualsByIdAndIsDefiningOntology(
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the individual, this value must be double URL encoded",
example = "http%3A%252F%2Fpurl.obolibrary.org%2Fobo%2FIAO_0000124") String iri,
example = "http://purl.obolibrary.org/obo/OHD_0000363") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the individual.",
example = "IAO_0000124") String shortForm,
example = "OHD_0000363") String shortForm,
@RequestParam(value = "obo_id", required = false)
@Parameter(name = "obo_id",
description = "This refers to the OBO ID of the individual.",
example = "IAO:0000124") String oboId,
example = "OHD:0000363") String oboId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ HttpEntity<PagedModel<V1Individual>> getAllIndividualsByOntology(
example = "iao") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the individual, this IRI should exist in the specified ontology by {onto} param. This value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FIAO_0000103") String iri,
description = "The IRI of the individual, this IRI should exist in the specified ontology by {onto} param.",
example = "http://purl.obolibrary.org/obo/IAO_0000002") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the individual, it should exist in the specified ontology by {onto} param.",
example = "IAO_0000124") String shortForm,
example = "IAO_0000002") String shortForm,
@RequestParam(value = "obo_id", required = false)
@Parameter(name = "obo_id",
description = "This refers to the OBO ID of the individual, it should exist in the specified ontology by {onto} param.",
example = "IAO:0000124") String oboId,
example = "IAO:0000002") String oboId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ HttpEntity<PagedModel<V1Property>> getAllPropertiesByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the property, this IRI should exist in the specified ontology by {onto} param. This value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000041") String iri,
description = "The IRI of the property, this IRI should exist in the specified ontology by {onto} param.",
example = "http://purl.obolibrary.org/obo/DUO_0000041") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the property, it should exist in the specified ontology by {onto} param.",
Expand Down Expand Up @@ -146,7 +146,7 @@ HttpEntity<PagedModel<V1Property>> getParents(
@PathVariable("iri")
@Parameter(name = "iri",
description = "The IRI of the property, this IRI should exist in the specified ontology by {onto} param. This value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000041") String termId,
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000179") String termId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand All @@ -161,12 +161,12 @@ HttpEntity<PagedModel<V1Property>> getParents(
HttpEntity<PagedModel<V1Property>> children(
@PathVariable("onto")
@Parameter(name = "onto",
description = "The ID of the ontology. For example for Data Use Ontology, the ID is duo.",
example = "duo") String ontologyId,
description = "The ID of the ontology.",
example = "mondo") String ontologyId,
@PathVariable("iri")
@Parameter(name = "iri",
description = "The IRI of the property, this IRI should exist in the specified ontology by {onto} param. This value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000041") String termId,
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000051") String termId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand All @@ -181,12 +181,12 @@ HttpEntity<PagedModel<V1Property>> children(
HttpEntity<PagedModel<V1Property>> descendants(
@PathVariable("onto")
@Parameter(name = "onto",
description = "The ID of the ontology. For example for Data Use Ontology, the ID is duo.",
example = "duo") String ontologyId,
description = "The ID of the ontology.",
example = "mondo") String ontologyId,
@PathVariable("iri")
@Parameter(name = "iri",
description = "The IRI of the property, this IRI should exist in the specified ontology by {onto} param. This value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000041") String termId,
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000051") String termId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand All @@ -201,12 +201,12 @@ HttpEntity<PagedModel<V1Property>> descendants(
HttpEntity<PagedModel<V1Property>> ancestors(
@PathVariable("onto")
@Parameter(name = "onto",
description = "The ID of the ontology. For example for Data Use Ontology, the ID is duo.",
example = "duo") String ontologyId,
description = "The ID of the ontology.",
example = "mondo") String ontologyId,
@PathVariable("iri")
@Parameter(name = "iri",
description = "The IRI of the property, this IRI should exist in the specified ontology by {onto} param. This value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000041") String termId,
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000051") String termId,
@RequestParam(value = "lang", required = false, defaultValue = "en") String lang,
@Parameter(hidden = true) Pageable pageable,
@Parameter(hidden = true) PagedResourcesAssembler assembler) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ private HttpEntity<PagedModel<V1Term>> termsByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the term, this value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String iri,
description = "The IRI of the term.",
example = "http://purl.obolibrary.org/obo/DUO_0000017") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the term.",
Expand Down Expand Up @@ -444,7 +444,7 @@ HttpEntity<String> graphJsTreeChildren(
@PathVariable("iri")
@Parameter(name = "iri",
description = "The IRI of the property, this IRI should exist in the specified ontology by {onto} param. This value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000051") String termId,
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String termId,
@PathVariable("nodeid")
@Parameter(name = "nodeid",
description = "This is the id of the node in the jstree of ontology specified by {onto} parameter",
Expand Down Expand Up @@ -524,8 +524,8 @@ HttpEntity<PagedModel<V1Term>> termChildrenByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the term, this value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String iri,
description = "The IRI of the term.",
example = "http://purl.obolibrary.org/obo/DUO_0000017") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the term.",
Expand Down Expand Up @@ -562,8 +562,8 @@ HttpEntity<PagedModel<V1Term>> termDescendantsByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the term, this value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String iri,
description = "The IRI of the term.",
example = "http://purl.obolibrary.org/obo/DUO_0000017") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the term.",
Expand Down Expand Up @@ -600,8 +600,8 @@ HttpEntity<PagedModel<V1Term>> termHierarchicalChildrenByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the term, this value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String iri,
description = "The IRI of the term.",
example = "http://purl.obolibrary.org/obo/DUO_0000017") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the term.",
Expand Down Expand Up @@ -638,8 +638,8 @@ HttpEntity<PagedModel<V1Term>> termHierarchicalDescendantsByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the term, this value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String iri,
description = "The IRI of the term.",
example = "http://purl.obolibrary.org/obo/DUO_0000017") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the term.",
Expand Down Expand Up @@ -676,8 +676,8 @@ HttpEntity<PagedModel<V1Term>> termParentsByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the term, this value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String iri,
description = "The IRI of the term.",
example = "http://purl.obolibrary.org/obo/DUO_0000017") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the term.",
Expand Down Expand Up @@ -714,8 +714,8 @@ HttpEntity<PagedModel<V1Term>> termAncestorsByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the term, this value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String iri,
description = "The IRI of the term.",
example = "http://purl.obolibrary.org/obo/DUO_0000017") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the term.",
Expand Down Expand Up @@ -752,8 +752,8 @@ HttpEntity<PagedModel<V1Term>> termHierarchicalAncestorsByOntology(
example = "duo") String ontologyId,
@RequestParam(value = "iri", required = false)
@Parameter(name = "iri",
description = "The IRI of the term, this value must be double URL encoded",
example = "http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDUO_0000017") String iri,
description = "The IRI of the term.",
example = "http://purl.obolibrary.org/obo/DUO_0000017") String iri,
@RequestParam(value = "short_form", required = false)
@Parameter(name = "short_form",
description = "This refers to the short form of the term.",
Expand Down
Loading