Code Monkey home page Code Monkey logo

Comments (4)

ispivey avatar ispivey commented on May 13, 2024

We should update https://developers.cloudflare.com/workers/runtime-apis/request#incomingrequestcfproperties to indicate which properties are available contingent on the developer's plan level, and label those properties with the minimum plan level required to have access to them.

This information was present in the previous docs at https://github.com/cloudflare/workers-docs/blob/master/workers-docs/src/content/reference/apis/request.md .

from cloudflare-docs.

ispivey avatar ispivey commented on May 13, 2024

@adamschwartz I could use some help deciding on the best way to solve this.

Some properties of IncomingRequestCfProperties are only populated for users on Biz or higher plans (for mostly-legacy reasons, but changing that is out of scope and a longer conversation). An example is city here: https://developers.cloudflare.com/workers/runtime-apis/request#incomingrequestcfproperties

It's currently represented like:

<Definitions>

- `city` <Type>string | null</Type>

  - City of the incoming request, e.g. `"Austin"`.

</Definitions>

I don't want to go back to the old world of grouping properties by plan type; I'd prefer to find a way to annotate this definition to indicate that Business is the minimum plan for which it's available, and have explanatory content elsewhere on the page explaining the details of this distinction.

What do you think we should do? Add text content to the end of each definition describing the minimum plan level, if one exists? Use a PropMeta or similar entity to describe the minimum plan next to the term itself?

from cloudflare-docs.

adamschwartz avatar adamschwartz commented on May 13, 2024

Thanks @ispivey for the great context.

I would recommend using a <PropMeta/> for now:

<Definitions>

- `city` <Type>string | null</Type> <PropMeta>Paid-plan only</PropMeta>

  - City of the incoming request, e.g. `"Austin"`.

</Definitions>

(Replace “Paid-plan only” with whatever is appropriate.)

Please just @ me on the PR and include a screenshot. If it feels like something special is warranted, like a <PlansTag/>, I can always whip one up.

Thanks

from cloudflare-docs.

Electroid avatar Electroid commented on May 13, 2024

Resolved by #569

from cloudflare-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.