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 type of StaticDocumentSpec.document in index.d.ts #328

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

radzom
Copy link
Contributor

@radzom radzom commented Dec 8, 2020

Closes #327

The type of the property 'document' in the interface StaticDocumentSpec in the file 'index.d.ts' was formerly specified as 'string' and was corrected to object.

I think one could even specify it as one of

  • SwaggerSchema.Spec (for swagger V2 specs -already imported) or
  • OpenApi3Spec (for OpenApi V3 specs - where can this come from?)

Are there other versions that would then need to be supported?

Checklist

@mcollina mcollina requested a review from a team December 8, 2020 17:59
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

index.d.ts Outdated Show resolved Hide resolved
examples/example-static-specification.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
@radzom radzom requested a review from mcollina December 15, 2020 00:17
tsconfig.json Outdated Show resolved Hide resolved
@radzom radzom requested review from mcollina and fox1t December 15, 2020 07:15
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@radzom
Copy link
Contributor Author

radzom commented Dec 15, 2020

Hi, is there anything left I need, can or have to do for this pull request?
I am not impatient, just curious.
It is my first PR, so i am not sure if the Checklist needs to be checked and who does it.
My assumption was someone else :-).

@Ethan-Arrowood
Copy link
Member

@radzom nothing else on your end I believe. We do our merges and releases manually so whenever that happens for this plugin your work will be completed and released. Thank you for contributing 😄

@climba03003 climba03003 mentioned this pull request Jan 11, 2021
8 tasks
@climba03003
Copy link
Member

@mcollina Sorry for tagging you. I do not know who is responsible for this plugin but I can see that there are no more change needed in here and with 3 persons approval. Should this PR be landed? I need the typing for #333.

@mcollina mcollina merged commit ba31090 into fastify:master Jan 14, 2021
@mcollina
Copy link
Member

Landed :)

mcollina pushed a commit that referenced this pull request Jan 26, 2021
* refactor: better file structure
- reduce the number of files in root folder

* refactor: extract common function
- hook
- formatParamUrl
- consumesFormOnly
- plainJsonObjectToSwagger2
- localRefResolve

* refactor: split dynamic handle to swagger and openapi

* feat: add openapi 3 support

* test: add openapi 3 test case

* feat: update openapi from 3.0.0 to 3.0.3

* refactor: typo

- properyName to propertyName

* refactor: more clear argument

- h to headers

* refactor: use map instead of reduce

* refactor: use done instead of next

* refactor: group functions

- remove getQueryParams, getPathParams, getHeaderParams, getFormParams
- add getParams

* refactor: genResponse  to generateResponse

* chore: remove invalid comment

* refactor: better structure

- split util to dynamicUtil, OpenapiUtil, swaggerUtil
- extract inline function from openapi and swagger

* feat: generate response according to produces

* feat: use package json as default info

* refactor: better cache name

* chore: add comment to address different issue

* feat: add oneOf, allOf, anyOf support in query, header, path, formData

* Fix type of StaticDocumentSpec.document (#328)

* refactor: better file structure
- reduce the number of files in root folder

* refactor: extract common function
- hook
- formatParamUrl
- consumesFormOnly
- plainJsonObjectToSwagger2
- localRefResolve

* refactor: split dynamic handle to swagger and openapi

* feat: add openapi 3 support

* test: add openapi 3 test case

* feat: update openapi from 3.0.0 to 3.0.3

* refactor: typo

- properyName to propertyName

* refactor: more clear argument

- h to headers

* refactor: use map instead of reduce

* refactor: use done instead of next

* refactor: group functions

- remove getQueryParams, getPathParams, getHeaderParams, getFormParams
- add getParams

* refactor: genResponse  to generateResponse

* chore: remove invalid comment

* refactor: better structure

- split util to dynamicUtil, OpenapiUtil, swaggerUtil
- extract inline function from openapi and swagger

* feat: generate response according to produces

* feat: use package json as default info

* refactor: better cache name

* chore: add comment to address different issue

* feat: add oneOf, allOf, anyOf support in query, header, path, formData

* refactor: better argument name

* feat: add cookies schema support for openapi 3

* fix: typo

* chore: add openapi typings

* docs: add openapi support docs

* docs: update as suggestion

* fix: openapi

Co-authored-by: radzom <[email protected]>
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.

Wrong Type for StaticDocumentSpec.document in index.d.ts
5 participants