API design – JSON API – How to "include" the parent?

I am trying to use the JSON API as the output format of my API. I have the scenario that one or more of my "relationships" are actually a father-son relationship. If the "relationships" only include the child, should the "included" include the child and the parent?

For example:

{
  "data": [
    {
      "type": "foos",
      "id": "1",
      "relationships": {
        "bars": {
          "data": [
            {
              "type": "bars",
              "id": "200"
            }
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "bars",
      "id": "200",
      "attributes": {
        "parent_id": "100",
        "name": "Foo Bar"
      },
      "links": {
        "self": "/api/bars/200"
      }
    },
    {
      "type": "bars",
      "id": "100",
      "attributes": {
        "parent_id": null,
        "name": "Something Other Than Foo Bar"
      },
      "links": {
        "self": "/api/bars/100"
      }
    }
  ]
}

The JSON is a valid JSON API according to https://jsonapi-validator.herokuapp.com/. However, I still wonder if the second "included" is appropriate.

I hope the JSON example is clear enough. Should I include the second "included"? Or is that information that should only be retrieved if the API consumer invokes the "own" URL of the first "included"?

spf: does the registration domain "include:" also refer to subdomains?

I have a question when setting up my SPF record. I would like to know if I set up an inclusion record in the SPF record it will also "include" the subdomains of that primary domain that I have included.

Let's take a look at an example in my doubt:

Example:

v=spf1 +include:example.com -all

Will this "+ include: example.com" be covered if my email is sent from subdomain1.example.com or subdomain2.example.com ???

I really appreciate your comments.

What is the difference between "include" and "extend" in Ruby?

I'm studying Ruby, and I've realized that there are 2 (maybe more) ways to inject methods into a class. At first I thought it could be the same, since Ruby is a language that claims to be very flexible for programmers.

However, I only attended a class where the teacher explained hook and the methods self.included, self.extended and self.inheritedand made me think: "Do these two ways below really make no difference?
"

Using the include:

class MinhaClasse
    include Modulo
end

Using the extend:

class MinhaClasse
    extend Modulo
end

Is there a difference between using the extend and include ? If so, what is the difference and when should I use each one?