-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
# DDF Service | ||
A simple DDF Study Definitions Repository (SDR) Simulator. A simple micro service that emulates the TransCelerate SDR functionality and provides the current API specification | ||
# USDM API | ||
This repository contains the official formal definition of the Unified Study Definitions Model (USDM) API. | ||
|
||
# Example Files | ||
See the json files within the study directory | ||
The API is defined by a set of python classes built using the pydantic library. These classes are then used from within FastAPI. FastAPI allows for the API specificition to be exported using the OpenAPI standard while also being executed as a server. | ||
|
||
# Docker | ||
## How to build the image | ||
``` | ||
docker build --pull --rm -f "Dockerfile" -t ddfservice:latest "." --build-arg DDF_SERVICE_PROJ_KEY_ARG=<DDFServiceProjectKey> | ||
``` | ||
|
||
## How to build the container | ||
``` | ||
docker container run -p 80:80 -dit --name ddf ddfservice:latest | ||
``` | ||
The repo formas part of the larger DDF USDM project that can be found in the CDISC [DDF-RA](https://github.com/cdisc-org/DDF-RA) repo. | ||
|
||
# Check syntax | ||
# Server Execution | ||
To run the server use the command | ||
``` | ||
uvicorn main:app | ||
uvicorn main:app --reload | ||
``` | ||
|
||
# Generate API json and yaml files | ||
To generate the OpenAPI specifications in both YAML and JSON format use the script | ||
``` | ||
. ./api_docs.sh | ||
``` | ||
./api_docs.sh | ||
``` | ||
This script employs the openapi.py utility |