Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Web API service for the PDS Registry, providing the implementation of the PDS Search API (https://github.com/nasa-pds/pds-api) for the PDS Registry.

License

NotificationsYou must be signed in to change notification settings

NASA-PDS/registry-api

DOI🤪 Unstable integration & delivery😌 Stable integration & delivery

This repository implements thesearch API v1.0.0-SNAPSHOT for the PDS registry.

It is composed with the following subcomponents:

  • lexer: parse the API request queries (q parameter), based on antlr4 grammar
  • model: library end-point controller definition and response objects generated from the openAPI specification (seehttps://github.com/NASA-PDS/pds-api/)
  • service: the API service, a spring-boot application

Prerequisites

For the API to work, you also need ElasticSearch/OpenSearch with some test data loaded in it.

Based ondocker you can easily start all the prerequisites as configured in theregistry repository. This repository is also useful to run theintegration tests:

git clone https://github.com/NASA-PDS/registry.git

Start the prerequisites by following theQuick Start Guide

Start the application from a released package

Get the latest stable releasehttps://github.com/NASA-PDS/registry-api/releases

Download the zip or tar.gz 'registry-api-service-1.0.0-bin' file.

Follow instructions in README.txt in the decompressed folder

Developers

Running the API

Prerequisites

To build and run the application you need:

  • jdk 17
  • maven

Additionally, harvested data will only be picked up correctly by the API if all of the following are true:

There are two approaches to running a local development instance of the API

[Option 1] Non-Containerized (useful for breakpoint debugging)

  1. Deploy an instance of the registry docker-compose

  2. Kill the existing API container

    docker kill docker-registry-api-1
  3. Temporarily disable certificate verification by making the following modification toapplication.properties

    openSearch.sslCertificateCNVerification=false
  4. Build the application

    mvn clean install
  5. Start the application

    cd servicemvn spring-boot:run

The API will now be accessible on (by default)https://localhost:8080

  1. Specific configuration profile: if you run the application in a specific environment you can define a dedicatedapplication.properties, for exampleapplication-dev.properties that does not need to be commited on git. Launch it as follow:

    mvn -Dspring-boot.run.profiles=dev spring-boot:run

[Option 2] Build a development docker image

Your local docker image will be used in the integration deployment described below.

mvn spring-boot:build-image

View Swagger UI

Go tohttp://localhost:8080

Integration deployment

You can deploy the registry-api together with all other components of the registry (harvest, opensearch, ...) and reference datasets.

Clone theregistry repository, and launch the docker compose script as described inhttps://github.com/NASA-PDS/registry/tree/main/docker

For example, launch:

docker compose --profile int-registry-batch-loader up

The integration tests will be automatically applied. Check the results, update/complete them as necessary

Tests

Important note: As a developer you are asked to complete the postman test suite according to the new feature you are developing. Do a pull request in theregistry project to submit the updates.

Integration test are maintained in postman.

Edit/Run of the integration tests in postman GUI

Install the postman desktop, fromhttps://www.postman.com/downloads/

Download and open the test suite found inhttps://github.com/NASA-PDS/registry/tree/main/docker/postman

Run the integration tests in command line

In theregistry project.

Launch the test in command line:

npm install newmannewman run docker/postman/postman_collection.json --env-var baseUrl=http://localhost:8080

[8]ページ先頭

©2009-2025 Movatter.jp