项目作者: pagopa

项目描述 :
PDND openapi server is a server for exposing PDND (ex DAF) api following the openapi 3 standard and the interoperability model
高级语言: Python
项目地址: git://github.com/pagopa/pdnd-openapi-server.git
创建时间: 2019-04-03T10:10:10Z
项目社区:https://github.com/pagopa/pdnd-openapi-server

开源协议:

下载


PDND open api server (pre-alpha)

This server exposes API from PDND according to openapi 3 specification and the interoperability model defined by Italian Governemnt organizations. It uses connexion framework for creating and exposing the server in a contract first approach. Remember each API is self documented if you want to read the details of each API read the openapi file or launch the service as described below.

Context

The goal of this project is to expose according to openapi 3 standards a set of API developed for PDND (ex Daf). The old API were developed according to swagger 2.0 standards, using Scala. We are now proxying those api throught this repo for becoming compliants with the new standards. Below the list of api we are wrapping:

Prerequisites

On your machine python 3 with pip and tox must be installed

Test

To test the API, just run

  1. tox

When debugging, you can run the following instead.

  1. tox -- --pdb --pdb-failure -vs --nologcapture

Launch

  1. tox -e run

connect to http://localhost:8080/pdnd-openapi/ui/

Docker

Docker MUST be installed on your local machine

  1. git clone https://github.com/teamdigitale/pdnd-openapi-server.git
  2. cd pdnd-openapi-server
  3. docker build -t pdnd-openapi-server .
  4. docker run -p 8080:8080 pdnd-openapi-server

open your browser at http://localhost:8080/pdnd-openapi/ui/

Tutorial

The service expose some API from PDND. It requires authentication using Basic Auth or Bearer meaning you as user must be registered here, and must be used respecting the throttling headers defined in accordance with the Linee Guida of the model of interoperability that will be released by the Italian Government organizations.

After registerd you can inser your Email and password:

Basic Auth

Once logged in with basic auth you can get the token as in the image below copy only the jwt value

Get jwt

Copy and paste the jwt and insert it for calling each API:

Jwt Auth

Now you can call the API as in the image below

Search API