Skip to content

feat: Support Kubernetes OpenAPI Schema #62

New issue

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

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

Already on GitHub? # to your account

Merged
merged 14 commits into from
Nov 7, 2021
Merged

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant