code: func (m *Method) inheritProtocols(parent []string) {
  	for _, p := range parent {
  		m.Protocols = appendStrNotExist(p, m.Protocols)
  	}
  }
docs: // inheritProtocols inherit method's protocols from parent protocols
  // parent protocols could be from resource type or a trait