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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/datasource request headers in api #4481

Merged
merged 6 commits into from May 18, 2021

Conversation

arunvjn
Copy link
Contributor

@arunvjn arunvjn commented May 14, 2021

Description

Display imported headers from datasource in API headers tab.

Fixes #2143

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Test coverage results 馃И

馃敶 Total coverage has decreased
// Code coverage diff between base branch:release and head branch: fix/datasource_request_headers_in_api 
Status File % Stmts % Branch % Funcs % Lines
馃敶 total 48.89 (-0.04) 28.61 (-0.03) 26.71 (-0.07) 49.26 (-0.04)
馃敶 app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx 25 (0) 2.7 (-0.24) 4.35 (0) 26.67 (-0.06)
馃敶 app/client/src/components/editorComponents/form/fields/KeyValueFieldArray.tsx 43.18 (0) 24.49 (-2.18) 0 (0) 44.19 (0)
馃敶 app/client/src/pages/Editor/APIEditor/Form.tsx 37.67 (-4.81) 44.19 (-9.66) 0 (0) 39.29 (-4.75)

</Text>
</Flex>
<Flex className="key-value disabled" size={3}>
<Text case={Case.CAPITALIZE} type={TextType.H6}>
Copy link
Member

Choose a reason for hiding this comment

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

Can we show the key & value as they have been typed instead of capitalizing the first character?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Show headers without capitalizing.
Copy link
Member

@hetunandu hetunandu left a comment

Choose a reason for hiding this comment

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

Add tests for this

@arunvjn arunvjn merged commit b14f043 into release May 18, 2021
@arunvjn arunvjn deleted the fix/datasource_request_headers_in_api branch May 18, 2021 16:10
@areyabhishek
Copy link
Contributor

We fixed this issue, which is great! But we haven't fixed the issue of saving headers into the datasource when I create an API and then click on 'save as datasource'. That has also been a long standing bug. Possible to get to it soon?

@areyabhishek
Copy link
Contributor

@arunvjn Could you see the above comment and let me know about the fix?

@arunvjn
Copy link
Contributor Author

arunvjn commented Jun 10, 2021

@areyabhishek I will get this done soon. Should be out in a couple of days

@areyabhishek
Copy link
Contributor

@arunvjn is this fix out? We have a user on Discord who complained about this

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.

[Bug] Reusing a saved datasource does not auto-import the headers from the datasource in the API pane
4 participants