Skip to content

Commit

Permalink
fix missing exposed generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Dec 26, 2023
1 parent cc76c51 commit 64f82e0
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion examples/generate-scala-enums/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScalaGenerator } from '../../src/generators/scala';
import { ScalaGenerator } from '../../src';

const generator = new ScalaGenerator();
const jsonSchemaDraft7 = {
Expand Down
2 changes: 1 addition & 1 deletion examples/generate-scala-models/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScalaGenerator } from '../../src/generators/scala';
import { ScalaGenerator } from '../../src';

const generator = new ScalaGenerator();
const jsonSchemaDraft7 = {
Expand Down
2 changes: 1 addition & 1 deletion examples/scala-generate-documentation/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PHP Generate Models With Documentation Preset
# Scala Generate Models With Documentation Preset

## How to run this example

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Should be able to render PHP and should log expected output to console 1`] = `
exports[`Should be able to render Scala models that include documentation and should log expected output to console 1`] = `
Array [
"/**
* Description for class
*
* @property email Description for the email property
*/
final class Root
{
private ?string $email;
public function getEmail(): ?string { return $this->email; }
public function setEmail(?string $email): void { $this->email = $email; }
}
",
case class Root(
email: Option[String],
)",
]
`;
2 changes: 1 addition & 1 deletion examples/scala-generate-documentation/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const spy = jest.spyOn(global.console, 'log').mockImplementation(() => {
});
import { generate } from './index';

describe('Should be able to render PHP', () => {
describe('Should be able to render Scala models that include documentation', () => {
afterAll(() => {
jest.restoreAllMocks();
});
Expand Down
6 changes: 3 additions & 3 deletions examples/scala-generate-documentation/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PhpGenerator, PHP_DESCRIPTION_PRESET } from '../../src';
import { SCALA_DESCRIPTION_PRESET, ScalaGenerator } from '../../src';

const generator: PhpGenerator = new PhpGenerator({
presets: [PHP_DESCRIPTION_PRESET]
const generator = new ScalaGenerator({
presets: [SCALA_DESCRIPTION_PRESET]
});
const jsonSchemaDraft7 = {
$schema: 'http://json-schema.org/draft-07/schema#',
Expand Down
2 changes: 1 addition & 1 deletion examples/scala-generate-documentation/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/scala-generate-documentation/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"config" : { "example_name" : "php-generate-documentation-preset" },
"config" : { "example_name" : "scala-generate-documentation" },
"scripts": {
"install": "cd ../.. && npm i",
"start": "../../node_modules/.bin/ts-node --cwd ../../ ./examples/$npm_package_config_example_name/index.ts",
Expand Down
1 change: 1 addition & 0 deletions src/generators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export * from './go';
export * from './rust';
export * from './kotlin';
export * from './cplusplus';
export * from './scala';
export * from './AbstractFileGenerator';

0 comments on commit 64f82e0

Please sign in to comment.