Commit d0a87d3a authored by Rob Tomsick's avatar Rob Tomsick

Convert from properties files to YAML

parent e09bcae4
......@@ -20,10 +20,10 @@ The CRxREST model is thoroughly documented within the
#### Dictionaries
Drug and product information within CRxREST is obtained from `Dictionary`s.
A dictionary generally corresponds to an external dataset of some form
(for example: the FDA's NDC database). As the data represented by various
datasets may vary, dictionaries may declare which portions of the CRxREST model
they support.
A dictionary generally corresponds to an external dataset of some form (for
example: the FDA's NDC database). As the data represented by various datasets
may vary, dictionaries may declare which portions of the CRxREST model they
support.
The underlying data for a `Dictionary` may come from any source that the
implementer wishes (e.g. a local file, a remote database.)
......@@ -45,7 +45,9 @@ NDC dataset and as an example of a dictionary + provider implementation.
## Configuration
All configuration properties are documented within `src/main/resources/application.properties`. Parameters may be set at run-time like so:
All configuration properties are documented within
`src/main/resources/application.yml`. Parameters may be set at
run-time like so:
`java -jar path/to/app.jar --crxrest.database.pool-size=2`
......@@ -61,10 +63,11 @@ OpenAPI documentation will be generated as part of the build process for
CRxREST. The resulting documentation will be placed within the `api-docs`
directory.
Included in the same directory is an HTML file providing the [ReDoc](https://github.com/Rebilly/ReDoc) viewer. Unfortunately due to flaw in the JSON Schema design, the viewer
will not be able to load the spec from the filesystem. Instead, to view the
documentation locally you will have to launch a web server which will serve
the `api-docs` directory. Yes, really.
Included in the same directory is an HTML file providing the
[ReDoc](https://github.com/Rebilly/ReDoc) viewer. Unfortunately due to flaw
in the JSON Schema design, the viewer will not be able to load the spec from
the filesystem. Instead, to view the documentation locally you will have to
launch a web server which will serve the `api-docs` directory. Yes, really.
## Barcode Search
......@@ -100,8 +103,9 @@ SPI mechanism.
Due to a flaw in `swagger-core`, there appears to be no way to properly
represent an empty body for those API operations that produce no content.
According to the generated API spec, such operations appear to produce an empty object. In reality they do not. Therefore, whenever an API operation is
documented as returning a 204 (No Content) status code, do not expect a
According to the generated API spec, such operations appear to produce an
empty object. In reality they do not. Therefore, whenever an API operation
is documented as returning a 204 (No Content) status code, do not expect a
response body to be present. None will.
......
......@@ -5,23 +5,29 @@
# Path which will be scanned for dictionary provider implementations. May be
# a directory or a JAR. Multiple paths are supported, delimited by a
# ';' (semicolon)
crxrest.dictionary.path=/tmp
# Size of database pool. This value applies to *each* database-backed
# provider. Must be >= 1
crxrest.database.pool-size=4
# Path for database persistence. Leave empty to disable persistence.
crxrest.database.path=/var/tmp/
crxrest:
dictionary:
path: /tmp
database:
# Size of database pool. This value applies to *each* database-backed
# provider. Must be >= 1
pool-size: 4
# Path for database persistence. Leave empty to disable persistence.
path: /var/tmp/
providers:
# provider specific configuration goes under this key space
# example:
# crx-ndc:
# product-path: /var/tmp/ndc/product.txt
# ---------------------------------------------------------------------------
# Spring properties
# ---------------------------------------------------------------------------
# prevent Spring from initializing our datasource of its own free will
# (don't touch this)
spring.datasource.initialize=false
# prevent Spring from exposing things via JMX
# (don't touch this)
spring.datasource.jmx-enabled=false
spring.jmx.enabled=false
\ No newline at end of file
spring:
datasource:
# prevent Spring from initializing our datasource of its own free will
# (don't touch this)
initialize: false
jmx-enabled: false
jmx.enabled: false
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment