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

[pull] main from geonetwork:main #92

Closed
wants to merge 50 commits into from
Closed

[pull] main from geonetwork:main #92

wants to merge 50 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 21, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Dec 21, 2023
josegar74 and others added 27 commits December 22, 2023 15:05
… GeoNetwork and requires authentication to access it. Fixes #7540 (#7556)
In some cases HttpStatus.CREATED was used when it should have been HttpStatus.OK and other cases it is the opposite.
Ensure that all tags have the same description.
…me and null version (#7575)

* Fix initialization of SpringDoc so that it does not use null servername and null version
Modified OpenApi object so that it is a static object that is shared with all context.  This helped fix initial api setting so that it was not set to null://null:80/geonetwork/srv/api
Also update SiteApi so that if the server properties are changed then it will update the OpenApi object without requiring an application restart.

* Update OpenAPI bean so that it calls the static method to ensure that no static values are changed directly in the bean.
Updated indexer to return an object IndexResponse instead of JSONObject
* Add missing apiResponse for group and map api

* Update services/src/main/java/org/fao/geonet/api/mapservers/MapServersApi.java

Co-authored-by: François Prunayre <[email protected]>

---------

Co-authored-by: François Prunayre <[email protected]>
…nistic. (#7574)

* Update SpringDoc json/yaml generator to make the results more deterministic.
This will make it easier to compare different versions between gn releases.

These are the properties that were enabled.

   springdoc.writer-with-order-by-keys=true
   springdoc.writer-with-default-pretty-printer=true

* Cleanup imports
… of JSONObject (#7585)

* API should accept a structured object instead of JSONObject
Updated link search to accept an object LinkFilter instead of JSONObject

* Fix error with Failed to convert value of type by adding a @InitBinder
…es using geodesic extents for local projections. (#7560)

* Metadata extents API / Make configurable to display the metadata bboxes using geodesic extents for local projections.

* Add unit tests
…cally (#7569)

* Home page / sort topic categories and INSPIRE themes facets alphabetically

* Home page / use facets configuration to sort alphabetically or by quantity

* Update web-ui/src/main/resources/catalog/components/elasticsearch/directives/FacetDirective.js

Co-authored-by: François Prunayre <[email protected]>

* Home page / sort topic categories and INSPIRE themes facets alphabetically - remove not required code

---------

Co-authored-by: François Prunayre <[email protected]>
…ars range.

Use moment-timezone-with-data-1970-2030.min.js version 0.5.43. For catalogues with  metadata containing dates before 1970, consider to use https://momentjs.com/downloads/moment-timezone-with-data.min.js
* fix duplicate check on uuid+initiative+association

* added gmx:anchor option and unit tests

* Format / Update SchematronRulesIsoTest.java

---------

Co-authored-by: François Prunayre <[email protected]>
… section is removed from the user interface until the metadata is saved
* Github / PR template / Add funded by

As discussed in last PSC meeting, invite contributor to inform about supporting organizations.

Approach similar to QGIS (https://github.com/qgis/QGIS/blob/0dcbea8674ee7196989c36a99f8b507e878db73b/.github/workflows/pr-needs-documentation.yml#L42-L70) which also add those information in the changelog

* Update PULL_REQUEST_TEMPLATE.md
Mapserver may return by default GetCapabilities in version 2.0.0.
Depending on the URL set in metadata records, WFS harvesting may fails
with:

```
2023-10-27T10:54:42,350 ERROR [geonetwork.harvest.wfs.features] -
Failed to connect to server 'http://geoservices.brgm.fr/geologie?language=fre&'.
Error is class net.opengis.wfs20.impl.WFSCapabilitiesTypeImpl
cannot be cast to class net.opengis.wfs.WFSCapabilitiesType
(net.opengis.wfs20.impl.WFSCapabilitiesTypeImpl and net.opengis.wfs.WFSCapabilitiesType
are in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @cda6100)
```
because of the `MapServerWFSStrategy` extending WFS1 strategy.

Use `StrictWFS_2_0_Strategy` if harvesting is done using 2.0.0 on
MapServer.

Can be tested with
```
curl 'http://localhost:8080/geonetwork/srv/api/workers/data/wfs/actions/start' \
  -X 'PUT' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: eng' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Cookie: JSESSIONID=node0hjdye0js612o1qex2n36lekt81.node0; serverTime=1698396822574; sessionExpiry=1698398922574; XSRF-TOKEN=c353b2ca-a77c-4552-839c-37405771c4e2;' \
  -H 'X-XSRF-TOKEN: c353b2ca-a77c-4552-839c-37405771c4e2' \
  --data-raw '{"url":"http://geoservices.brgm.fr/geologie?language=fre&","strategy":"investigator","typeName":"GITES_EMP","version":"2.0.0"}' \
  --compressed
```
* Build info improvements.

Remove unused server.prop file.
Display git branch, git commit, build time only (remove git describe which is misleading).

* Add application version to site information API

---------

Co-authored-by: Jose García <[email protected]>
… from getKeywordById api (#7586)

* Remove POST method from getKeywordById. api
A get method should not generally support a POST?
It caused duplicates duplicate OperationID that would occur (getKeywordById and getKeywordById_1)

* Re added POST method for keyword and depreciated the GET api.

* Use common private getKeyword function for both api calls.

* Revert endpoint back to /keyword for GET
#7376)

* Search results / Configure related records type depending on template.

The search API provides the possibility to load related records
for each hits. This allows to easily display them in search results
but it also slow down a bit the search.

Currently only the `list.html` template was displaying them based
on the following configuration:

```
resultViewTpls: ...
grid: {
  related: ["parent", "children", "services", "datasets"]
},
```

but user may want to customize this depending on the result template.

This move the configuration to the `resultViewTpls` (and preserve
previous mechanism)

```
resultViewTpls: ...
              {
                tplUrl:
                  "../../catalog/components/" +
                  "search/resultsview/partials/viewtemplates/list.html",
                tooltip: "List",
                icon: "fa-bars",
                related: ["parent", "children", "services", "datasets"]
              },
```

so that user can more easily define which relations to load during
search depending on the result template used.

* Search / Optimize field based on current template

Each search results templates display a specific set of fields.
Add possibility to exclude unused fields from search to speed up search.

At some point, it could be better to declare all required fields for
rendering records on a per template basis on top of required fields
needed for the JS app logic (eg. privileges, status, draft).

* Batch edit / Properly init result template config.

* Search / Optimize field based on current template / Add admin UI config.
…proxy servlet (#7326)

* Configuration to restrict the hosts and ports accessible by the http proxy servlet

---------

Co-authored-by: François Prunayre <[email protected]>
* Set API enum as ref
- This will allow common reference to enum in the open api spec.

* set enum asref for ReservedGroup group as well.
…7588)

* Fix issue with @ResponseStatus and @ApiResponse being out of sync.
Update @ApiResponse so that they are in sync with @ResponseStatus

* Change Delete on record/tags so that it returns OK 200.
josegar74 and others added 21 commits January 10, 2024 12:08
* Service context null pointer

* Service context null pointer for JCloud and S3
* Fix duplicate API endpoint
There were GET 2 apis with the end point /feeds.
One was renamed to /feedsAsHtml

* Based on feedback.  Removed /feedsAsHtml endpoint and now check Accept header when calling /feeds to determine if XML or HTML should be returned.
…#7601)

* Changed http to https for urls that appear in open api specification.
Also fixed some minor formatting.


Co-authored-by: Jose García <[email protected]>
…earch query (#7529)

CSW GetRecords doesn't escape query values when creating the Elasticsearch query / Escape Elasticsearch special chars in EQUAL / NOT EQUAL / IS LIKE literal queries

Fixes #7527.
---------

Co-authored-by: Juan Luis Rodríguez <[email protected]>
* Fix SpringDoc duplicate OperationId
OperationId are generally created based on the function name.  In some cases multiple function names were the same and this was causing OperationId conflicts which was causing one to be called functionName and the other to be called functionName_1.  By simply renaming the function names, it resolves the duplicate OperationId

* Update services/src/main/java/org/fao/geonet/api/records/MetadataSharingApi.java

Co-authored-by: Jose García <[email protected]>

---------

Co-authored-by: Jose García <[email protected]>
…7594)

* Add missing @ApiResponse status for successful api search response.
Otherwise OpenAPI spec was missing response which caused issues when using codegen.

Fixed body parameters and removed httpEntity.getBody()
Also added example value for body.

* Remove @Schema from request body as maps object will be corrected in PR #7611

* Revert request body back to string.
The insert api only accepts XML so remove others.
This will remove application/json as the default which causes issues with codegen.
* schemas now uses `SNAPSHOTS`, no longer to manage schemas `3.8` explicitly.
* Remember to include `-Drelease` flag so that all modules (even optional modules) are compiled and tested during QA.
* Troubleshoot release module order of execution and profile activation and handling of jetty folder.
* Web profile with-doc profile needs dependency to build docs first.
---------

Signed-off-by: Jody Garnett <[email protected]>
Sonarcloud analyzer now requires at least Java 17.
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.12.0 to 4.0.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@v3.12.0...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Remove the custom grid styles, the latest version of Material for MkDocs has this as a default option.

The minimum version for Material for MkDocs is 9.5, this is added in the `requirements.txt`
Minor text edits
@juanluisrp juanluisrp closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.