Commit 05eda2b2 authored by Blaise de Carné 's avatar Blaise de Carné

Merge branch 'release/1.1.2'

parents 7060cecb ec086b49
Pipeline #64345 passed with stage
in 17 seconds
......@@ -6,6 +6,11 @@ et ce projet adhère à [Semantic Versioning](http://semver.org/spec/v2.0.0.html
## En cours
## [1.1.2] - 2018-07-26
### Correction
- SchemaCompiler : correction de l'URI de xsd:dateTime pour le mapping des types
## [1.1.1] - 2018-06-18
### Modifications
......
......@@ -3,7 +3,7 @@
"license": "MIT",
"keywords": ["graphql","datatourisme","api","sparql","opendata"],
"type": "library",
"version": "1.1.1",
"version": "1.1.2",
"homepage": "https://www.datatourisme.gouv.fr",
"authors": [
{
......
{
"name": "datatourisme-api",
"version": "1.1.0",
"version": "1.1.2",
"repository": "https://framagit.org/datatourisme/api",
"author": "Conjecto <contact@conjecto.com>",
"license": "MIT",
......
......@@ -32,7 +32,7 @@ class SchemaCompiler
'http://www.w3.org/2001/XMLSchema#decimal' => FloatType::class,
'http://www.w3.org/2001/XMLSchema#float' => FloatType::class,
'http://www.w3.org/2001/XMLSchema#date' => DateTimeType::class,
'http://www.w3.org/2001/XMLSchema#datetime' => DateTimeType::class,
'http://www.w3.org/2001/XMLSchema#dateTime' => DateTimeType::class,
'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' => LangStringType::class
];
......
......@@ -5,18 +5,25 @@ header('Access-Control-Allow-Credentials: true', true);
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Content-Type');
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
return;
}
$payload = null;
if (isset($_SERVER['CONTENT_TYPE']) && $_SERVER['CONTENT_TYPE'] === 'application/json') {
$rawBody = file_get_contents('php://input');
$requestData = json_decode($rawBody ?: '', true);
} else {
$requestData = $_POST;
switch($_SERVER['REQUEST_METHOD']) {
case "POST":
if (isset($_SERVER['CONTENT_TYPE']) && $_SERVER['CONTENT_TYPE'] === 'application/json') {
$rawBody = file_get_contents('php://input');
$requestData = json_decode($rawBody ?: '', true);
} else {
$requestData = $_POST;
}
break;
case "GET":
$requestData = $_GET;
break;
default:
exit;
}
$payload = isset($requestData['query']) ? $requestData['query'] : null;
$payload = isset($requestData['query']) ? $requestData['query'] : null;
require_once __DIR__.'/../vendor/autoload.php';
$processor = \Datatourisme\Api\DatatourismeApi::create('http://localhost:9999/blazegraph/namespace/kb/sparql');
......
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