Skip to content

Commit

Permalink
feat: config refs (#16)
Browse files Browse the repository at this point in the history
* feat: created config ref connecting table

* feat: config refs insert wip

* feat: wip

* feat: working refs without tests

* test: finished unit and integration

* style: prettier

* fix: removed unneeded whitespace
  • Loading branch information
CptSchnitz authored Jun 17, 2024
1 parent 8dd35cc commit 78c392d
Show file tree
Hide file tree
Showing 21 changed files with 1,487 additions and 81 deletions.
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

26 changes: 26 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import mapColoniesPrettierConfig from '@map-colonies/prettier-config';

/** @type {import('prettier').Config} */
const prettierConfig = {
plugins: ['prettier-plugin-embed', 'prettier-plugin-sql'],
};

/** @type {import('prettier-plugin-embed').PrettierPluginEmbedOptions} */
const prettierPluginEmbedConfig = {
embeddedSqlIdentifiers: ['sql'],
};

/** @type {import('prettier-plugin-sql').SqlBaseOptions} */
const prettierPluginSqlConfig = {
language: 'postgresql',
keywordCase: 'upper',
};

const config = {
...mapColoniesPrettierConfig,
...prettierConfig,
...prettierPluginEmbedConfig,
...prettierPluginSqlConfig,
};

export default config;
9 changes: 8 additions & 1 deletion openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ paths:
required: true
schema:
$ref: '#/components/schemas/configName'
- $ref: '#/components/parameters/ShouldDereferenceConfigQuery'
operationId: getConfigsByName
summary: get a specific client connection for specific environment
responses:
Expand Down Expand Up @@ -99,6 +100,7 @@ paths:
- type: string
enum: ['latest']
- $ref: '#/components/schemas/version'
- $ref: '#/components/parameters/ShouldDereferenceConfigQuery'
get:
operationId: getVersionedConfig
summary: get a specific version of a config
Expand Down Expand Up @@ -272,6 +274,12 @@ components:
required: false
schema:
type: string
ShouldDereferenceConfigQuery:
name: shouldDereference
in: query
description: should the server bundle all refs into one config
schema:
type: boolean
schemas:
error:
type: object
Expand Down Expand Up @@ -347,7 +355,6 @@ components:
version:
$ref: '#/components/schemas/version'
config:
type: object
additionalProperties: true
example: { host: 'localhost', port: 8080 }
createdAt:
Expand Down
Loading

0 comments on commit 78c392d

Please sign in to comment.