Skip to content

Conversation

Himenon
Copy link
Owner

@Himenon Himenon commented Nov 6, 2021

Summary

Ensure that the following OpenAPI Schema can be correctly converted to TypeScript

wget https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json
swagger2openapi ./swagger.json -o openapi.json

Some Bug Fix

  • escape name

Test Plan

  • add snapshot

const basePath = `${parentName}/${name}`;
store.addStatement(basePath, {
kind: "namespace",
name,
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug Fix

@@ -175,7 +157,7 @@ export const generateStatements = (
export: true,
name: converterContext.generateRequestBodyName(operationId),
type: factory.TypeReferenceNode.create({
name: context.resolveReferencePath(currentPoint, `${reference.path}`) + "." + Name.ComponentChild.Content, // TODO Contextから作成?
name: context.resolveReferencePath(currentPoint, `${reference.path}`).name + "." + Name.ComponentChild.Content, // TODO Contextから作成?
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug FIX

@Himenon Himenon changed the title feat: support Kubernetes OpenAPI Schema feat: Support Kubernetes OpenAPI Schema Nov 7, 2021
@Himenon Himenon merged commit 3e5f4ef into main Nov 7, 2021
@Himenon Himenon deleted the feat/kubernetes-schema branch November 7, 2021 03:16
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.

1 participant