Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Emit top level primitives for missing Languages #2552

Conversation

inferrinizzard
Copy link
Contributor

@inferrinizzard inferrinizzard commented Apr 4, 2024

Description

Adds extra steps to emit top level Primitives in the following languages:

  • TypeScriptFlowRenderer.emitTypes
  • Kotlin.emitSourceStructure

Motivation and Context

Fixes #2488

Input Data

{
    "id": "http://json-schema.org/geo",
    "$schema": "http://json-schema.org/draft-06/schema#",
    "description": "Top level primitive",
    "type": "number"
}

Previous Behaviour / Output

Previously had no output in types section, only converters

New Behaviour / Output

TypeScript:

/**
 * Top level primitive
 */
type Coordinate = number;

Kotlin:

/**
 * Top level primitive
 */
typealias Coordinate = Double

How Has This Been Tested?

Added new top-level-primitive.schema test

Screenshots (if appropriate):

N/a

@inferrinizzard inferrinizzard changed the title fix(typescript): Emit top level primitives in emitTypes for TypeScript fix(typescript): Emit top level primitives for missing Languages Apr 5, 2024
@inferrinizzard inferrinizzard changed the title fix(typescript): Emit top level primitives for missing Languages fix: Emit top level primitives for missing Languages Apr 5, 2024
@dvdsgl dvdsgl merged commit 32028a8 into glideapps:master Apr 20, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

top level simple type doesnt work
2 participants