= Visibility _(enum)_
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Specifies which elements of the metamodel are included within the generated swagger spec.

== API

[source,java]
.Visibility.java
----
enum Visibility {
  PUBLIC     // <.>
  PRIVATE     // <.>
  PRIVATE_WITH_PROTOTYPING     // <.>
  boolean isPublic()
  boolean isPrivate()
  boolean isPrivateWithPrototyping()
}
----

<.> xref:#PUBLIC[PUBLIC]
+
--
Specification for use by third-party clients, ie public use and not under the control of the authors of the backend Apache Isis application.
--
<.> xref:#PRIVATE[PRIVATE]
+
--
Specification for use only by internally-managed clients, ie private internal use.
--
<.> xref:#PRIVATE_WITH_PROTOTYPING[PRIVATE_WITH_PROTOTYPING]
+
--
As _#PRIVATE_ , also including any prototype actions (where _Action#restrictTo()_ set to _RestrictTo#PROTOTYPING_ ).
--

== Members

[#PUBLIC]
=== PUBLIC

Specification for use by third-party clients, ie public use and not under the control of the authors of the backend Apache Isis application.

The generated swagger spec is therefore restricted only to include only view models ( _DomainObject#nature()_ of _org.apache.isis.applib.annotation.Nature#VIEW_MODEL_ ) and to REST domain services ( _DomainService#nature()_ of _NatureOfService#REST_ ). Exposing entities also would couple the REST client too deeply to the backend implementation.

[#PRIVATE]
=== PRIVATE

Specification for use only by internally-managed clients, ie private internal use.

This visibility level removes all constraints and so includes the specifications of domain entities as well as view models. This is perfectly acceptable where the team developing the REST client is the same as the team developing the backend service ... the use of the REST API between the client and server is a private implementation detail of the application.

[#PRIVATE_WITH_PROTOTYPING]
=== PRIVATE_WITH_PROTOTYPING

As _#PRIVATE_ , also including any prototype actions (where _Action#restrictTo()_ set to _RestrictTo#PROTOTYPING_ ).
