diff --git a/spec-templates/apis/README.md b/spec-templates/apis/README.md new file mode 100644 index 0000000..cf2dec0 --- /dev/null +++ b/spec-templates/apis/README.md @@ -0,0 +1,23 @@ +# Specification + +1. Create a destination folder path [Or repository] +2. Create a folder called `apis` + +3. For each `.yaml` file in `https://github.com/baas-devops-ecos/grandcentral-spec/tree/master/src/main/resources` + + 1. `${API_NAME}` is the name of the file without the extension + 2. Create a folder `api/${API_NAME}` + 3. Copy this file into `apis/${API_NAME}/specification.yml` + 4. Create `apis/${API_NAME}/apiInformation.json` with the following values taken from the source spec file + +```json +{ + "properties": { + "apiRevision": "@info.semanticVersion", + "apiVersion": "@info.version", + "displayName": "@info.title", + "isCurrent": true, + "subscriptionRequired": true, + } +} +``` \ No newline at end of file diff --git a/spec-templates/backends/README.md b/spec-templates/backends/README.md new file mode 100644 index 0000000..ea9804e --- /dev/null +++ b/spec-templates/backends/README.md @@ -0,0 +1,23 @@ +# Specification + +1. Create a destination folder path [Or repository] +2. Create a folder called `backends` + +3. For each service that constitutes a hostname (e.g. pod) that you will communicate with + + 1. `${BACKEND_NAME}` is the name of that service + 2. `${BACKEND_URL}` is the hostname + 3. Create a folder `backends/${BACKEND_NAME}` + 4. Create `backends/${BACKEND_NAME}/backendInformation.json` with the following values taken from the service + +```json +{ + "properties": { + "protocol": "http", + "url": "${BACKEND_URL}" + } +} +``` + +## Notes +If we don't know the hostname until deployment time, then we can skip the url property (or have a placeholder) and use the configuration.dev.yaml to supply that value at deployment time. diff --git a/spec-templates/products/grandcentral/README.md b/spec-templates/products/grandcentral/README.md new file mode 100644 index 0000000..1e0a341 --- /dev/null +++ b/spec-templates/products/grandcentral/README.md @@ -0,0 +1,32 @@ +# Specification + +1. Create a destination folder path [Or repository] +2. Create a folder called `products` +3. At the moment we are solving a single Product (but we could add multiple products later) + `${PRODUCT_NAME}`= "Grand Central" + +4. Create a folder `products/${PRODUCT_NAME}` +5. Create `backends/${PRODUCT_NAME}/productInformation.json` with the following hardcoded values. Later we could pass in a variable and this could be the customer name + +```json +{ + "properties": { + "displayName": "Grand Central", + "state": "published", + "subscriptionRequired": true + } +} +``` + +6. Create a file called `backends/${PRODUCT_NAME}/apis.json` +7. We have to create an array of objects that match the name of each api that this product should have access to. I think this would be easier after we create all the APIs as then we can just iterate around all the folder names. + +An example + +```json +[ + { + "name": "${API_NAME1}" + } +] +``` \ No newline at end of file diff --git a/spec-templates/products/grandcentral/policy.xml b/spec-templates/products/grandcentral/policy.xml new file mode 100644 index 0000000..5bf8ea7 --- /dev/null +++ b/spec-templates/products/grandcentral/policy.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file