parse-community / docs

Parse Platform docs
https://docs.parseplatform.org
Other
313 stars 518 forks source link

docs: REST API python examples update #896

Closed cyb3rko closed 2 years ago

cyb3rko commented 2 years ago

Updated the Python examples (Closes #894). Changes I've made:

Optional step left:

Do we want to fix it or was there any reason why it was implemented like that?

image

mtrezza commented 2 years ago

Looks to me as if the indentation was by mistake. There may be some IDEs that apply special indentation rules by default, one example is Android Studio. But indentation is generally a custom style decision, so I'd fix the indentation for better readability and consistency.

cyb3rko commented 2 years ago

Yes, most modern IDEs support auto-formatting.

Then I will fix this as well. The Python conventions say that one indentation level equals 4 spaces: https://peps.python.org/pep-0008/#indentation

cyb3rko commented 2 years ago

Alright, fixed indentation and Json formatting.

cyb3rko commented 2 years ago

But I realised a few of those examples have a fix domain and don't support that input at the top of the page where you enter your own server connection information.

Is that intended or should we fix this as well? Example: https://docs.parseplatform.org/rest/guide/#localizing-push

mtrezza commented 2 years ago

I think this is a well-intended feature, but I don't think we should provide it for security reasons.

This feature asks developers to enter their Parse Server URL, master key and client keys on a webform and submit it. Asking that of a developer goes against establishing a good security practice and facilitates phishing. IMO we should never ask a developer to enter this information anywhere, but in fact create awareness about the sensitivity of that data and remind to never share it with anyone outside their project.

The only way such a feature may make sense was if the docs were made part of a Parse Dashboard backend where the user logged into the dashboard already has access to that information and it is merely displayed from the backend data.

I'm for removing this feature from the docs and just use common placeholders throughout the code. I'd do that in a separate PR though.

Opened https://github.com/parse-community/docs/issues/898 to track this.

cyb3rko commented 2 years ago

Alright, then it's ready to merge.