Skip to content

pukkaone/odata-spring-boot-starter

Repository files navigation

OData Spring Boot Starter  Maven Central

Convenient dependency descriptors to add OData to your application.

OData Elasticsearch Spring Boot Starter

This adds an OData endpoint which reads data from Elasticsearch.

Usage

Add this dependency to your Maven project:

<dependency>
  <groupId>com.github.pukkaone</groupId>
  <artifactId>odata-elasticsearch-spring-boot-starter</artifactId>
  <version>${odata-spring-boot-starter.version}</version>
</dependency>

Set these application properties:

spring:
  elasticsearch:
    rest:
      uris: ELASTICSEARCH_REST_API_URI

Application Properties

Various properties can be specified inside your application.properties or application.yml file, or as command line switches.

odata.web.service-parent-path

OData service root URI will be ${server.servlet.context-path}${odata.web.service-parent-path}/ alias_or_index_name
Default: /odata

Translating Elasticsearch to Entity Data Model

Elasticsearch Entity Data Model Name

alias/index

Namespace

alias_or_index_name

alias/index

Schema

Namespace

alias/index

Entity Container

alias_or_index_name

alias/index

Entity Set

alias_or_index_name

alias/index

Entity Type

Namespace . alias_or_index_name

nested

Collection(Complex Type)

Namespace . nested_name

object

Complex Type

Namespace . object_name