moqada / simple-api-client-generator

API Client Generator from JSON Hyper Schema
MIT License
2 stars 3 forks source link

Fixed format of generated FlowType #25

Closed ideyuta closed 7 years ago

ideyuta commented 7 years ago

cc @moqada

Because the format of the generated Flow was strange, I corrected it. Check it out!

Now

export type Calendar_event = {
assignedResources:     {
      entity?:       {
              birthday: string,
                      company: string,
                              createdAt: string,
                                      description: string,
                                              id: number,
                                                      name: string,
                                                              status: string,
                                                                      updatedAt: string
                                                                            },
                                                                                  id?: number,
                                                                                        type?: string
                                                                                            }[],
                                                                                            createdAt: string,
                                                                                            date: string,
                                                                                            key: string,
                                                                                            originResourceEntity:   {
                                                                                                birthday: string,
                                                                                                    company: string,
                                                                                                        createdAt: string,
                                                                                                            description: string,
                                                                                                                id: number,
                                                                                                                    name: string,
                                                                                                                        status: string,
                                                                                                                            updatedAt: string
                                                                                                                              },
                                                                                                                              originResourceType: string,
                                                                                                                              updatedAt: string
                                                                                                                              }

Fixed

export type Calendar_event = {
  assignedResources: {
    entity?: {
      birthday: string,
      company: string,
      createdAt: string,
      description: string,
      id: number,
      name: string,
      status: string,
      updatedAt: string
    },
    id?: number,
    type?: string
  }[],
  createdAt: string,
  date: string,
  key: string,
  originResourceEntity: {
    birthday: string,
    company: string,
    createdAt: string,
    description: string,
    id: number,
    name: string,
    status: string,
    updatedAt: string
  },
  originResourceType: string,
  updatedAt: string
}
moqada commented 7 years ago

@ideyuta Thank you for improving the format. But, I could not reproduce about "now example"...

However, nice!

cm_zp8hvmaahdss