Skip to content

Commit

Permalink
intial work, doesnt pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shale99 committed Jul 8, 2018
1 parent b696620 commit dcf5b4e
Show file tree
Hide file tree
Showing 55 changed files with 1,275 additions and 952 deletions.
1 change: 1 addition & 0 deletions codestyles-suppressions.xml
Expand Up @@ -12,4 +12,5 @@
<suppress checks="AvoidStaticImport" files=".*[\\/]src[\\/](test|it)[\\/]"/>
<suppress checks="WriteTag" files=".*[\\/]src[\\/](test|it)[\\/]"/>
<suppress checks="MethodCount" files=".*[\\/]src[\\/](test|it)[\\/]"/>
<suppress checks="." files="[\\/]generated-sources[\\/]"/>
</suppressions>
8 changes: 1 addition & 7 deletions domain-models-api-aspects/pom.xml
Expand Up @@ -34,13 +34,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.raml</groupId>
<artifactId>raml-jaxrs-codegen-core</artifactId>
<version>1.3.4</version>
<scope>compile</scope>
</dependency>
</dependency>
</dependencies>


Expand Down

This file was deleted.

10 changes: 2 additions & 8 deletions domain-models-api-interfaces/pom.xml
Expand Up @@ -66,12 +66,6 @@
<artifactId>domain-models-interface-extensions</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.raml</groupId>
<artifactId>raml-jaxrs-codegen-core</artifactId>
<version>1.3.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xmlParserAPIs</artifactId>
Expand Down Expand Up @@ -100,7 +94,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
</dependency>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -149,7 +143,7 @@
</systemProperty>
<systemProperty>
<key>jsonschema.customfield</key>
<value>{"fieldname" : "readonly" , "fieldvalue": true , "annotation" : "javax.validation.constraints.Null"}</value>
<value>{"fieldname": "test", "fieldvalue": true, "annotation": {"type":"javax.validation.constraints.Null"}}</value>
</systemProperty>
</systemProperties>
</configuration>
Expand Down
23 changes: 13 additions & 10 deletions domain-models-api-interfaces/ramls/admin.raml
@@ -1,18 +1,18 @@
#%RAML 0.8
#%RAML 1.0

title: Admin API
baseUri: http://localhost:8081/{version}
version: v1

traits:
- log-level: !include traits/log-level.raml
- upload-handler: !include traits/upload-handler.raml
- history: !include traits/history.raml
- dbname: !include traits/dbname.raml
- secured: !include raml-util/traits/auth.raml
- secret-key: !include traits/secret-key.raml
- slow-query: !include traits/slow-query.raml
- pid: !include traits/pid.raml
log-level: !include traits/log-level.raml
upload-handler: !include traits/upload-handler.raml
history: !include traits/history.raml
dbname: !include traits/dbname.raml
secured: !include raml-util/traits/auth.raml
secret-key: !include traits/secret-key.raml
slow-query: !include traits/slow-query.raml
pid: !include traits/pid.raml

/admin:
/uploadmultipart:
Expand All @@ -23,11 +23,14 @@ traits:
Uploads a file and saves it to a directory configured on the server
body:
multipart/form-data:
formParameters:
properties:
file:
description: The file to be uploaded
required: true
type: file
file2:
type: file
fileTypes: ['text/html']
responses:
200:
description: "Saved"
Expand Down
6 changes: 3 additions & 3 deletions domain-models-api-interfaces/ramls/book.schema
Expand Up @@ -12,7 +12,7 @@
"type":"string"
},
"description":{
"type": "null"
"type": "string"
},
"datetime":{
"type":"object",
Expand Down Expand Up @@ -54,11 +54,11 @@
"type":"integer"
},
"metadata": {
"$ref": "raml-util/schemas/metadata.schema",
"$ref": "metadata",
"readonly" : true
},
"resultInfo": {
"$ref": "raml-util/schemas/resultInfo.schema",
"$ref": "resultInfo",
"readonly" : true
}
},
Expand Down
2 changes: 1 addition & 1 deletion domain-models-api-interfaces/ramls/bulk.schema
Expand Up @@ -19,7 +19,7 @@
},
"last_modified": {
"type": "object",
"$ref" : "last_modified.schema",
"$ref" : "last_modified",
"readonly": true
},
"inst_id": {
Expand Down
2 changes: 1 addition & 1 deletion domain-models-api-interfaces/ramls/bulks.schema
Expand Up @@ -7,7 +7,7 @@
"type": "array",
"items": {
"type": "object",
"$ref" : "bulk.schema",
"$ref" : "bulk",
"readonly": true
}
},
Expand Down
17 changes: 17 additions & 0 deletions domain-models-api-interfaces/ramls/examples/book.sample
@@ -0,0 +1,17 @@
{
"data": {
"title": "ABCDEFGHIJKLMNOPQ",
"description": "string",
"genre": "ABCDEFGHIJKLMNOPQRSTUVWXYZAB",
"author": "ABCDE",
"link": "ABCDEFGHIJ",
"_id": "ABCDEFGH",
"datetime": {
"$date": "ABCD"
}
},
"success": false,
"status": 165,
"_id": "ABCDEFGHIJKLMNOPQRSTUVWX",
"image": "ABCDEFGHIJKLMNOPQRSTUVWX"
}
4 changes: 2 additions & 2 deletions domain-models-api-interfaces/ramls/job.schema
Expand Up @@ -29,14 +29,14 @@
},
"last_modified": {
"type": "object",
"$ref" : "last_modified.schema"
"$ref" : "last_modified"
},
"inst_id": {
"type": "string"
},
"parameters": {
"type": "object",
"$ref" : "raml-util/schemas/parameters.schema",
"$ref" : "parameters",
"readonly": true
}
},
Expand Down
46 changes: 23 additions & 23 deletions domain-models-api-interfaces/ramls/jobs.raml
@@ -1,30 +1,30 @@
#%RAML 0.8
#%RAML 1.0

title: Admin API
baseUri: http://localhost:8081/v1
version: v1

schemas:
- last_modified.schema: !include last_modified.schema
- jobs: !include jobs.schema
- job.schema: !include job.schema
- jobs_conf.schema: !include jobs_conf.schema
- jobs_confs: !include jobs_confs.schema
- raml-util/schemas/parameters.schema: !include raml-util/schemas/parameters.schema
- parameter: !include parameter.schema
- bulks: !include bulks.schema
- bulk.schema: !include bulk.schema
types:
last_modified: !include last_modified.schema
jobs: !include jobs.schema
job: !include job.schema
job_conf: !include jobs_conf.schema
jobs_confs: !include jobs_confs.schema
parameters: !include raml-util/schemas/parameters.schema
parameter: !include parameter.schema
bulks: !include bulks.schema
bulk: !include bulk.schema

traits:
- orderable: !include raml-util/traits/orderable.raml
- pageable: !include raml-util/traits/pageable.raml
- searchable: !include raml-util/traits/searchable.raml
- language: !include raml-util/traits/language.raml
- secured: !include raml-util/traits/auth.raml
orderable: !include raml-util/traits/orderable.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
language: !include raml-util/traits/language.raml
secured: !include raml-util/traits/auth.raml

resourceTypes:
- collection: !include raml-util/rtypes/collection.raml
- collection-item: !include raml-util/rtypes/item-collection.raml
collection: !include raml-util/rtypes/collection.raml
collection-item: !include raml-util/rtypes/item-collection.raml

/jobs:
/jobconfs:
Expand All @@ -35,7 +35,7 @@ resourceTypes:
exampleCollection: !include examples/jobs_confs.sample
exampleItem: !include examples/jobs_conf.sample
schemaCollection: jobs_confs
schemaItem: jobs_conf.schema
schemaItem: job_conf
get:
is: [
searchable: {description: "native mongodb query syntax with valid searchable fields: for example location", example: "{\"module\":\"IMPORTS\"}"},
Expand All @@ -49,14 +49,14 @@ resourceTypes:
type:
collection-item:
exampleItem: !include examples/jobs_conf.sample
schema: jobs_conf.schema
schema: job_conf
/jobs:
type:
collection:
exampleCollection: !include examples/jobs.sample
exampleItem: !include examples/job.sample
schemaCollection: jobs
schemaItem: job.schema
schemaItem: job
get:
is: [
searchable: {description: "native mongodb query syntax with valid searchable fields: for example location", example: "{\"job_conf_id\":\"12345\"}"},
Expand All @@ -67,11 +67,11 @@ resourceTypes:
type:
collection-item:
exampleItem: !include examples/job.sample
schema: job.schema
schema: job
/bulks:
type:
collection:
exampleCollection: !include examples/bulks.sample
exampleItem: !include examples/bulk.sample
schemaCollection: bulks
schemaItem: bulk.schema
schemaItem: bulk
2 changes: 1 addition & 1 deletion domain-models-api-interfaces/ramls/jobs.schema
Expand Up @@ -7,7 +7,7 @@
"type": "array",
"items": {
"type": "object",
"$ref" : "job.schema"
"$ref" : "job"
}
},
"total_records": {
Expand Down
4 changes: 2 additions & 2 deletions domain-models-api-interfaces/ramls/jobs_conf.schema
Expand Up @@ -40,11 +40,11 @@
},
"last_modified": {
"type": "object",
"$ref": "last_modified.schema"
"$ref": "last_modified"
},
"parameters": {
"type": "object",
"$ref" : "raml-util/schemas/parameters.schema"
"$ref" : "parameters"
}
},
"required": [
Expand Down
2 changes: 1 addition & 1 deletion domain-models-api-interfaces/ramls/jobs_confs.schema
Expand Up @@ -7,7 +7,7 @@
"type": "array",
"items": {
"type": "object",
"$ref" : "jobs_conf.schema"
"$ref" : "job_conf"
}
},
"total_records": {
Expand Down
9 changes: 9 additions & 0 deletions domain-models-api-interfaces/ramls/kv_configuration.sample
@@ -0,0 +1,9 @@
{
"module": "CIRCULATION",
"configName": "validation_rules",
"code": "PATRON_RULE",
"description": "for patrons",
"default": true,
"enabled": true,
"value": ""
}
46 changes: 46 additions & 0 deletions domain-models-api-interfaces/ramls/kv_configuration.schema
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"module": {
"type": "string",
"test": true
},
"configName": {
"type": "string"
},
"code": {
"type": "string",
"test2": false
},
"description": {
"type": "string"
},
"default": {
"type": "boolean"
},
"enabled": {
"type": "boolean",
"test2": true
},
"value": {
"type": "string"
},
"userId": {
"type": "string"
},
"metadata": {
"$ref": "metadata",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"module",
"configName"
]
}

0 comments on commit dcf5b4e

Please sign in to comment.