Skip to content

Commit 25d0a69

Browse files
committed
#191: Add attributes_case setting to config
1 parent 9d63abc commit 25d0a69

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/Blocks/Config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ private function setContent()
7575
$this->setTag();
7676
$this->openRoot();
7777
$this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));
78+
$this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CAMEL_CASE);
7879
$this->setQueryParams();
7980
$this->setTrees();
8081
$this->setJwtContent();

src/Types/ConfigInterface.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ interface ConfigInterface
1919
public const CUSTOM_SQL = 'custom_sql';
2020
public const QUERY = 'query';
2121
public const BINDINGS = 'bindings';
22-
public const DATABASE = 'database';
23-
public const PASSWORD = 'password';
24-
public const HOST = 'host';
25-
public const PORT = 'port';
22+
public const ATTRIBUTES_CASE = 'attributes_case';
2623

2724
public const STATE_MACHINE = 'state_machine';
2825
public const SPELL_CHECK = 'spell_check';
@@ -39,12 +36,11 @@ interface ConfigInterface
3936
public const SPELL_CHECK_METHOD = 'setSpellOptions';
4037
public const BIT_MASK_METHOD = 'setBitMaskOptions';
4138
public const CACHE_METHOD = 'setCacheOptions';
42-
public const JWT_METHOD = 'setJwtOptions';
39+
40+
// json-api attributes can be in one of: camel-case, snake-case, lisp-case
41+
public const DEFAULT_CAMEL_CASE = 'snake-case';
4342

4443
// todo: make this prop set via config for tests to run normally
4544
public const DEFAULT_ACTIVATE = 30;
4645
public const DEFAULT_EXPIRES = 3600;
47-
48-
public const DEFAULT_REDIS_HOST = '127.0.0.1';
49-
public const DEFAULT_REDIS_PORT = 6379;
5046
}

0 commit comments

Comments
 (0)