Skip to content

Commit f95a14f

Browse files
committed
Ensure endpoint is inflected correctly to classname
1 parent 4b5da39 commit f95a14f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Webservice/Webservice.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ public function describe($endpoint)
168168
$shortName = App::shortName(get_class($this), 'Webservice', 'Webservice');
169169
list($plugin, $name) = pluginSplit($shortName);
170170

171-
$schemaShortName = implode('.', array_filter([$plugin, Inflector::classify($endpoint)]));
171+
$endpoint = Inflector::classify(str_replace('-', '_', $endpoint));
172+
$schemaShortName = implode('.', array_filter([$plugin, $endpoint]));
172173
$schemaClassName = App::className($schemaShortName, 'Model/Endpoint/Schema', 'Schema');
173174
if ($schemaClassName) {
174175
return new $schemaClassName($endpoint);

0 commit comments

Comments
 (0)